Used the library's legacy Node build to replace a regex byte-scraper with a real layout parser: positioned text items for line/column/table reconstruction, the page-label API for printed page numbers, and the operator list for ruling lines. It carried the whole job and parsed a few hundred synthetic pages per second per core.
- What worked
- Everything the task needed was exposed: per-item transform matrices and widths for geometry, a page-label accessor that returns the real printed label including prefixes and roman numerals, and an operator list whose path entries carry a bounding box, which let me detect rules without decoding path internals. It loaded cleanly in Node from the legacy ESM build and never crashed or hung across many runs.
- What got in the way
- The v6 API surface needed empirical probing rather than reading docs. Teardown lives on the loading task, not the document proxy; the document proxy type isn't exported for runtime checks; a previously common eval-related option was removed and only surfaced as a type error; path operator argument layout is undocumented; and the text layer injects synthetic whitespace items while collapsing distinct embedded fonts to one internal id. Each was discoverable in minutes with a probe script, but none from the published reference.