@boxpdf/html-writer 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +6 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # `@boxpdf/html-writer`
2
2
 
3
- Streams text-oriented HTML from pages produced by `@boxpdf/reader`. This is the
4
- PDF-to-HTML package; it is intentionally named differently from `boxpdf-html`,
5
- which converts HTML in the opposite direction.
3
+ Streams text-oriented HTML from pages produced by `@boxpdf/reader`.
6
4
 
7
5
  ```ts
8
6
  import { open } from "node:fs/promises";
@@ -26,8 +24,8 @@ try {
26
24
  ```
27
25
 
28
26
  The default `positioned` layout preserves text coordinates. The optional
29
- `flow` layout uses the reader's inferred lines and tables. Images, vector
30
- graphics, and exact font reproduction are not yet rendered.
27
+ `flow` layout uses the reader's inferred lines and tables. The current output
28
+ surface excludes images, vector graphics, and exact font reproduction.
31
29
 
32
30
  The callback is awaited for every chunk, so a file stream, HTTP response, or
33
31
  Web `WritableStream` can apply backpressure. The caller owns and closes the PDF
@@ -39,9 +37,9 @@ or allowlist user-provided PDF URLs before passing them to the HTTP example.
39
37
  ## Compatibility oracle
40
38
 
41
39
  Tests compare normalized page geometry, text, and anchor positions with
42
- Poppler's `pdftohtml -c -hidden -noframes -zoom 1` output. Poppler runs only as
43
- an independent test oracle; its resource use is not part of the writer's memory
44
- contract.
40
+ Poppler's `pdftohtml -c -hidden -noframes -zoom 1` output. Poppler serves as an
41
+ independent test oracle. The writer's memory contract covers the reader and
42
+ HTML serialization.
45
43
 
46
44
  `pnpm poppler:report` runs the positioned writer over all 62 text fixtures in
47
45
  the pinned PDF.js corpus. The checked-in baseline currently records exact text
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boxpdf/html-writer",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Stream PDF pages from @boxpdf/reader to accessible or positioned HTML.",
5
5
  "keywords": [
6
6
  "pdf",
@@ -51,7 +51,7 @@
51
51
  "prepublishOnly": "pnpm quality"
52
52
  },
53
53
  "peerDependencies": {
54
- "@boxpdf/reader": "workspace:^"
54
+ "@boxpdf/reader": "^0.1.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@biomejs/biome": "^2.5.10",