asposefontnodejs 24.10.0 → 24.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +47 -69
  2. package/package.json +4 -5
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Node.js API to Manipulate Font Files
2
2
 
3
- Add font manipulation and conversion features to your Node.js applications.
3
+ Add font manipulation and conversion features to your Node.js applications.
4
4
 
5
5
  [Aspose.Font for Node.js via C++](https://products.aspose.com/font/nodejs-cpp/) allows convert ttf, otf, cff, type1 font files to ttf and svg formats, read and write truetype font metadata information.
6
6
 
@@ -10,91 +10,69 @@ Add font manipulation and conversion features to your Node.js applications.
10
10
  </a>
11
11
  </p>
12
12
 
13
- ## PDF Processing
13
+ ## Font Processing via C++
14
14
 
15
- - **Extract text** from PDF pages or search for a particular text segment using regular expressions.
16
- - **Add or extract** images to & from PDF documents.
17
- - **Concatenate** or **split** PDF files.
18
- - **Linearization** of PDF documents for web optimization.
19
- - **Convert** PDF documents to Office, web, and image formats with the highest visual fidelity.
20
- - **Manipulate** PDF files to manage bookmarks, hyperlinks, watermarks, attachments & annotations.
21
- - **Encrypt** or **decrypt** PDF documents and set document privileges or modify passwords.
22
- - **Digitally sign PDF** documents or remove signatures. Also, verify if the PDF is signed and the signature is valid.
15
+ - [Load font files from disc](https://docs.aspose.com/font/cpp/loading-saving-cff-fonts/) as well as stream.
16
+ - Read font information and save updated font files to disc.
17
+ - Support for [*TrueType* and *OpenType*](https://docs.aspose.com/font/cpp/working-with-truetype-and-opentype-fonts/) Fonts.
18
+ - Work with [CFF](https://docs.aspose.com/font/cpp/working-with-cff-fonts/) & [Type1 fonts](https://docs.aspose.com/font/cpp/working-with-type1-fonts/) in your C++ Apps.
19
+ - Read Glyphs and Metrics information from Font files.
20
+ - Detect Latin Symbols in Fonts.
21
+ - Extract embedded licensing information from font files.
22
+ - Render text using font Glyphs.
23
23
 
24
- ## Read & Write PDF & Other Formats
24
+ ## Read & Write Font Formats
25
25
 
26
- **Fixed Layout:** PDF, PDF/A
26
+ TTF
27
27
 
28
- ## Save PDF Documents As
28
+ ## Read Font Formats
29
29
 
30
- - **Microsoft Office:** DOC, DOCX, XLS, XLSX, PPTX
31
- - **Images:** JPEG, PNG, BMP, TIFF
32
- - **Others:** EPUB, DICOM, SVG, SVG(ZIP), GRAYSCALE PDF, PDF/A, TEX, TXT
30
+ TTC, OpenType, CFF, Type1
33
31
 
34
- ## Platform Independence
32
+ ## System Requirements
35
33
 
36
- Aspose.PDF for Node.js via C++ is a WebAssembly-based library that can be used to create applications in Node.js environment.
37
- The library was written in C++ and does not require additional runtime environments.
34
+ Aspose.Font for Node.js is developed to work in Node.js environment. It is recommended to use Node.js latest version (20.14 and above)
38
35
 
39
- ## Getting Started with Aspose.PDF for Node.js via C++
36
+ ## Get Started with Aspose.Font for NodeJS via C++
40
37
 
41
- Are you ready to give Aspose.PDF for Node.js via C++ a try?
42
-
43
- - Execute `npm install asposepdfnodejs` in Terminal in Visual Studio Code or in another console.
44
-
45
- ## Setting up
46
-
47
- - You need arial.ttf and times.ttf fonts to perform basic operations
48
-
49
- ## Extract Text From Whole PDF
50
-
51
- **CommonJS**:
52
- ```js
53
- const AsposePdf = require('asposepdfnodejs');
54
- const pdf_file = 'Aspose.pdf';
55
- AsposePdf().then(AsposePdfModule => {
56
- /*Extract text from a PDF-file*/
57
- const json = AsposePdfModule.AsposePdfExtractText(pdf_file);
58
- console.log("AsposePdfExtractText => %O", json.errorCode == 0 ? json.extractText : json.errorText);
59
- });
38
+ Are you ready to give Aspose.Font for C++ a try? Simply execute `npm install asposefontnodejs`. If you already have Aspose.Font for C++ and want to upgrade the version, please execute `npm update asposefontnodejs` to get the latest version.
39
+ Use AsposeFontforNode
40
+ - in your cjs:
60
41
  ```
61
- **ECMAScript/ES6**:
62
- ```js
63
- import AsposePdf from 'asposepdfnodejs';
64
- const AsposePdfModule = await AsposePdf();
65
- const pdf_file = 'Aspose.pdf';
66
- /*Extract text from a PDF-file*/
67
- const json = AsposePdfModule.AsposePdfExtractText(pdf_file);
68
- console.log("AsposePdfExtractText => %O", json.errorCode == 0 ? json.extractText : json.errorText);
42
+ const AsposeFont = require('asposefontnodejs');
43
+ ```
44
+ - or mjs modules:
45
+ ```
46
+ import AsposeFont from 'asposefontnodejs';
69
47
  ```
70
48
 
71
- ## Save PDF as Office Formats
49
+ ## Examples of getting metadata
72
50
 
73
- One of the most popular features of Aspose.PDF for Node.js via C++ is to convert PDF documents to other formats without needing to understand the underlying structure of the resultant format.
51
+ 1. Run the [AsposeFontGetInfo](https://reference.aspose.com/font/nodejs-cpp/metadata/asposefontgetinfo/) function.
52
+ 2. In case the `json.errorCode` is 0, you can get the result data. When the `json.errorCode` parameter is not equal to 0 and, accordingly, you will receive an error in your file, then information about such an error will be contained in the `json.errorText`.
53
+ 3. The resulting json object contains `records` array. Each record contains fields `NameId`, `PlatformId`, `PlatformSpecificId`, `LanguageId`, `Info` with information from `name` table of font.
74
54
 
75
- Give the following snippet a try with your samples:
55
+ ```js
56
+ const AsposeFont = require('asposefontnodejs');
76
57
 
77
- **CommonJS**:
58
+ const font_file = "./fonts/12380_C0_0.cff";
78
59
 
79
- ```js
80
- const AsposePdf = require('asposepdfnodejs');
81
- const pdf_file = 'Aspose.pdf';
82
- AsposePdf().then(AsposePdfModule => {
83
- /*Convert a PDF-file to DocX and save the "ResultPDFtoDocX.docx"*/
84
- const json = AsposePdfModule.AsposePdfToDocX(pdf_file, "ResultPDFtoDocX.docx");
85
- console.log("AsposePdfToDocX => %O", json.errorCode == 0 ? json.fileNameResult : json.errorText);
86
- });
87
- ```
60
+ console.log('Aspose.Font for Node.js via C++ example');
88
61
 
89
- **ECMAScript/ES6**:
62
+ AsposeFont().then(AsposeFontModule => {
90
63
 
91
- ```js
92
- import AsposePdf from 'asposepdfnodejs';
93
- const AsposePdfModule = await AsposePdf();
94
- const pdf_file = 'Aspose.pdf';
95
- /*Convert a PDF-file to DocX and save the "ResultPDFtoDocX.docx"*/
96
- const json = AsposePdfModule.AsposePdfToDocX(pdf_file, "ResultPDFtoDocX.docx");
97
- console.log("AsposePdfToDocX => %O", json.errorCode == 0 ? json.fileNameResult : json.errorText);
64
+ //AsposeFontGetInfo - get metadata information
65
+ const json = AsposeFontModule.AsposeFontGetInfo(font_file);
66
+ console.log("AsposeFontGetInfo => %O", json.errorCode == 0 ? json.records.reduce((ret, a) => ret +
67
+ "\nNameId : " + a.NameId
68
+ + "; PlatformId : " + a.PlatformId
69
+ + "; PlatformSpecificId : " + a.PlatformSpecificId
70
+ + "; LanguageId : " + a.LanguageId
71
+ + "; Info : " + a.Info,"") : json.errorText);
72
+
73
+ },
74
+ reason => {console.log(`The unknown error has occurred: ${reason}`);}
75
+ );
98
76
  ```
99
77
 
100
- [Home](https://www.aspose.com/) | [Product Page](https://products.aspose.com/pdf/nodejs-cpp/) | [Docs](https://docs.aspose.com/pdf/nodejs-cpp/) | [Demos](https://products.aspose.app/pdf/family) | [API Reference](https://reference.aspose.com/pdf/nodejs-cpp/) | [Examples](https://github.com/aspose-pdf/aspose-pdf-js) | [Blog](https://blog.aspose.com/category/pdf/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/pdf) | [Temporary License](https://purchase.aspose.com/temporary-license)
78
+ [Home](https://www.aspose.com/) | [Product Page](https://products.aspose.com/font/cpp) | [Docs](https://docs.aspose.com/font/cpp/) | [API Reference](https://apireference.aspose.com/font/cpp) | [Examples](https://github.com/aspose-font/Aspose.Font-for-C/tree/master/Examples) | [Blog](https://blog.aspose.com/category/font/) | [Search](https://search.aspose.com/) | [Free Support](https://forum.aspose.com/c/font) | [Temporary License](https://purchase.aspose.com/temporary-license)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "asposefontnodejs",
3
3
  "description": "Aspose.Font for Node.js via C++",
4
- "version": "24.10.0",
4
+ "version": "24.10.1",
5
5
  "homepage": "https://products.aspose.com/font/nodejs-cpp/",
6
6
  "readmeFilename": "README.md",
7
7
  "main": "./AsposeFontforNode.cjs",
@@ -34,8 +34,8 @@
34
34
  "node": ">=16.4.0"
35
35
  },
36
36
  "author": {
37
- "name": "Aspose.Font for C++ Team",
38
- "url": "https://products.aspose.com/font/"
37
+ "name": "Aspose.Font for C++ Team",
38
+ "url": "https://products.aspose.com/font/"
39
39
  },
40
40
  "license": "See Licence in LICENCE.md",
41
41
  "keywords": [
@@ -48,6 +48,5 @@
48
48
  "C++",
49
49
  "WebAssembly"
50
50
  ],
51
- "dependencies": {
52
- }
51
+ "dependencies": {}
53
52
  }