Conversation
…l order pdf-inspector 1.14.2 emitted right-to-left runs in visual order, so Hebrew, Arabic and Persian came out character-reversed. Fixed upstream in pdf-inspector#440 and #441 (released in 1.16.0), but every published anydoc-wasm still pinned 1.14.2. Closes firecrawl#170. The only snapshot that moves is pdf/text.pdf, and every change is an improvement: "Persian with ZWNJ" now reads as written, the endnote marker becomes a proper <sup>, and the table heading is grouped with its rows.
|
I measured the bump target on Arabic specifically: 1.20.0 is not far enough. Setup. Windows x64, Node bindings from npm, one version per temp folder, same input for all. Sample: a three-line Arabic HTML page printed with headless Edge — nothing attached and nothing hosted; two commands reproduce it, happy to share them. Metrics against the known text: character error rate (CER), the same rate with all spaces removed, and the share of the expected words that survive intact. I also checked that
So on this sample firecrawl/pdf-inspector#440 and firecrawl/pdf-inspector#441 (1.16.0) fixed letter order but left the spacing, and the text only becomes usable at 1.22.0 — which includes firecrawl/pdf-inspector#552 (RTL lines read back through the Unicode Bidirectional Algorithm), likely the fix, though I haven't bisected. Suggest targeting 1.23.0 or newer rather than 1.20.0 (and if you prefer a floor, 1.22.0 rather than 1.16). It costs nothing extra here: Worth noting for the snapshot: the only Arabic-script text in the PDF fixtures is one Persian word in |
Closes #170.
pdf-inspector1.14.2 emits right-to-left runs in visual order, so Hebrew, Arabic and Persian text comes out character-reversed (in my corpus, 52 of 77 Hebrew PDFs). The fix landed upstream in firecrawl/pdf-inspector#440 and #441 and shipped inpdf-inspector1.16.0 on 2026-08-21, but@firecrawl/anydoc-wasm0.2.4 (published after that) still locks 1.14.2, so a plainnpm installreproduces the bug.This bumps
Cargo.tomlto1.20.0(current release) and regeneratesCargo.lockwithcargo update -p pdf-inspector;lopdfmoves 0.42 → 0.45 as part of that, everything else is transitive.Snapshots. One snapshot changes,
pdf/text.pdf, and each line of it is an improvement:Persian with ZWNJ: مهاوخیم→میخواهم(was reversed, now reads as written; this is the bug from anydoc-wasm still ships pdf-inspector 1.14.2 — the RTL extraction fix (pdf-inspector#440) isn't included #170)i An endnote follows here.→An endnote follows here<sup>i</sup>.(the endnote marker is now attached where it belongs)## Tableheading is now grouped with its rows on one line instead of split off as its own sectionChecked locally, matching
ci.yml:cargo clippy --workspace --all-targets --all-features -- -D warningsclean,cargo test --lockedgreen (286 + 1 + 9 tests),cargo check --workspacebuildsanydoc-wasmandanydoc-pythonon the new lock.Happy to adjust the version pin if you'd rather take
1.16as the floor than1.20.0.Summary by cubic
Bumps
pdf-inspectorfrom 1.14.2 to 1.20.0 so right-to-left text (Hebrew, Arabic, Persian) extracts in logical order instead of character-reversed, closing #170.lopdfmoves 0.42 → 0.45 as a transitive update.pdf/text.pdf) improves each affected line: Persian now reads as written, the endnote marker becomes<sup>, and the table heading stays with its rows.@firecrawl/anydoc-wasm0.2.4 still pins 1.14.2, so this affects source builds only.Written for commit 3863d52. Summary will update on new commits.