@pdftron/data-extraction 10.2.0-1 → 10.2.0-2
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/package.json +2 -2
- package/readme.md +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pdftron/data-extraction",
|
|
3
|
-
"version": "10.2.0-
|
|
3
|
+
"version": "10.2.0-2",
|
|
4
4
|
"main": "./lib/main.js",
|
|
5
5
|
"binary": {
|
|
6
6
|
"module_name": "ApryseIDP",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "Commercial",
|
|
21
21
|
"homepage": "https://www.apryse.com",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@pdftron/pdfnet-node": "10.2.0",
|
|
23
|
+
"@pdftron/pdfnet-node": "~10.2.0",
|
|
24
24
|
"@mapbox/node-pre-gyp": "^1.0.3"
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
package/readme.md
CHANGED
|
@@ -18,12 +18,23 @@ Installation will fail if your OS, Node.js or Electron version is not supported.
|
|
|
18
18
|
|
|
19
19
|
Add the `@pdftron/data-extraction` package as a dependency in your `package.json`
|
|
20
20
|
|
|
21
|
+
Inside of your @pdftron/pdfnet-node code after initialization you should include the following line:
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
await PDFNet.addResourceSearchPath("./node_modules/@pdftron/data-extraction/lib")
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Here is an example of data extraction being used with this line.
|
|
28
|
+
|
|
21
29
|
```javascript
|
|
22
30
|
const { PDFNet } = require('@pdftron/pdfnet-node');
|
|
23
31
|
const licenseKey = "Insert license key here"
|
|
24
32
|
const inputFile = "Insert input file location here"
|
|
25
33
|
|
|
26
34
|
async function main() {
|
|
35
|
+
// This is where we import data-extraction
|
|
36
|
+
await PDFNet.addResourceSearchPath("./node_modules/@pdftron/data-extraction/lib")
|
|
37
|
+
|
|
27
38
|
// Extract document structure as a JSON file
|
|
28
39
|
console.log('Extract document structure as a JSON file');
|
|
29
40
|
|