asposefontnodejs 24.10.0 → 24.12.0
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.
- package/AsposeFontForNode.wasm +0 -0
- package/AsposeFontforNode.cjs +1 -1
- package/AsposeFontforNode.mjs +1 -1
- package/README.md +47 -69
- package/package.json +4 -5
package/AsposeFontForNode.wasm
CHANGED
|
Binary file
|
package/AsposeFontforNode.cjs
CHANGED
package/AsposeFontforNode.mjs
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Node.js API to Manipulate Font Files
|
|
2
2
|
|
|
3
|
-
Add font
|
|
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
|
-
##
|
|
13
|
+
## Font Processing via C++
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
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
|
|
24
|
+
## Read & Write Font Formats
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
TTF
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Read Font Formats
|
|
29
29
|
|
|
30
|
-
|
|
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
|
-
##
|
|
32
|
+
## System Requirements
|
|
35
33
|
|
|
36
|
-
Aspose.
|
|
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
|
-
##
|
|
36
|
+
## Get Started with Aspose.Font for NodeJS via C++
|
|
40
37
|
|
|
41
|
-
Are you ready to give Aspose.
|
|
42
|
-
|
|
43
|
-
-
|
|
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
|
-
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
##
|
|
49
|
+
## Examples of getting metadata
|
|
72
50
|
|
|
73
|
-
|
|
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
|
-
|
|
55
|
+
```js
|
|
56
|
+
const AsposeFont = require('asposefontnodejs');
|
|
76
57
|
|
|
77
|
-
|
|
58
|
+
const font_file = "./fonts/12380_C0_0.cff";
|
|
78
59
|
|
|
79
|
-
|
|
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
|
-
|
|
62
|
+
AsposeFont().then(AsposeFontModule => {
|
|
90
63
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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/
|
|
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.
|
|
4
|
+
"version": "24.12.0",
|
|
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
|
-
|
|
38
|
-
|
|
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
|
}
|