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 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("sample.pdf");
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 the bundled `sample.pdf` on load and lets
58
- you pick another file locally (nothing is uploaded). Build `demo/pkg/` as above
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdf2-wasm",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "PDF 2.0 in the browser: open, inspect and render with the pdf2 crate compiled to WebAssembly.",
5
5
  "license": "Unlicense OR MIT",
6
6
  "type": "module",