@iyulab/unpdf 0.10.0 → 0.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/package.json +1 -1
- package/unpdf_wasm.d.ts +8 -0
- package/unpdf_wasm_bg.js +26 -0
- package/unpdf_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/unpdf_wasm.d.ts
CHANGED
|
@@ -15,6 +15,14 @@ export class PdfDocument {
|
|
|
15
15
|
private constructor();
|
|
16
16
|
free(): void;
|
|
17
17
|
[Symbol.dispose](): void;
|
|
18
|
+
/**
|
|
19
|
+
* Extraction diagnostics as a JSON string, mirroring the other bindings.
|
|
20
|
+
*
|
|
21
|
+
* `pagesIncomplete` is the field to check before indexing the result: a damaged
|
|
22
|
+
* PDF parses successfully over a short page set, and a page that never arrived
|
|
23
|
+
* is otherwise indistinguishable from a page that never existed.
|
|
24
|
+
*/
|
|
25
|
+
extractionQuality(): string;
|
|
18
26
|
static fromBytes(data: Uint8Array): PdfDocument;
|
|
19
27
|
metadata(): string;
|
|
20
28
|
pageCount(): number;
|
package/unpdf_wasm_bg.js
CHANGED
|
@@ -80,6 +80,32 @@ export class PdfDocument {
|
|
|
80
80
|
const ptr = this.__destroy_into_raw();
|
|
81
81
|
wasm.__wbg_pdfdocument_free(ptr, 0);
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Extraction diagnostics as a JSON string, mirroring the other bindings.
|
|
85
|
+
*
|
|
86
|
+
* `pagesIncomplete` is the field to check before indexing the result: a damaged
|
|
87
|
+
* PDF parses successfully over a short page set, and a page that never arrived
|
|
88
|
+
* is otherwise indistinguishable from a page that never existed.
|
|
89
|
+
* @returns {string}
|
|
90
|
+
*/
|
|
91
|
+
extractionQuality() {
|
|
92
|
+
let deferred2_0;
|
|
93
|
+
let deferred2_1;
|
|
94
|
+
try {
|
|
95
|
+
const ret = wasm.pdfdocument_extractionQuality(this.__wbg_ptr);
|
|
96
|
+
var ptr1 = ret[0];
|
|
97
|
+
var len1 = ret[1];
|
|
98
|
+
if (ret[3]) {
|
|
99
|
+
ptr1 = 0; len1 = 0;
|
|
100
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
101
|
+
}
|
|
102
|
+
deferred2_0 = ptr1;
|
|
103
|
+
deferred2_1 = len1;
|
|
104
|
+
return getStringFromWasm0(ptr1, len1);
|
|
105
|
+
} finally {
|
|
106
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
83
109
|
/**
|
|
84
110
|
* @param {Uint8Array} data
|
|
85
111
|
* @returns {PdfDocument}
|
package/unpdf_wasm_bg.wasm
CHANGED
|
Binary file
|