pdf2-wasm 1.0.1 → 1.0.3
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/README.md +7 -3
- package/demo/pkg/pdf2_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ its renderer: open a PDF 2.0 file in the browser, read its facts and paint a pag
|
|
|
7
7
|
import init, { open } from "pdf2-wasm";
|
|
8
8
|
|
|
9
9
|
await init();
|
|
10
|
-
const response = await fetch("
|
|
10
|
+
const response = await fetch("samples/text.pdf");
|
|
11
11
|
const doc = open(new Uint8Array(await response.arrayBuffer()), null);
|
|
12
12
|
console.log(doc.version(), doc.pageCount(), doc.pageSize(0));
|
|
13
13
|
console.log(doc.text(0));
|
|
@@ -54,8 +54,12 @@ plus its JS glue; the current build is about 199 KiB gzipped).
|
|
|
54
54
|
|
|
55
55
|
## Demo
|
|
56
56
|
|
|
57
|
-
`demo/` is a static page: it renders
|
|
58
|
-
|
|
57
|
+
`demo/` is a static page: it renders a bundled sample on load, offers the crate's
|
|
58
|
+
own fixtures as samples (text, paths, images, the six-page calibration file and
|
|
59
|
+
an AES-256 encrypted file whose password is `user`), and lets you drop any PDF
|
|
60
|
+
in — nothing is uploaded. Pages, zoom (fit or 50–300%), keyboard navigation and
|
|
61
|
+
the extracted text of the current page are part of the demo rather than the
|
|
62
|
+
library. Build `demo/pkg/` as above
|
|
59
63
|
and serve the directory:
|
|
60
64
|
|
|
61
65
|
```sh
|
|
Binary file
|