Skip to content

fix(pdf): bump pdf-inspector to 1.20.0 so RTL text extracts in logical order - #175

Open
shlomsh wants to merge 1 commit into
firecrawl:mainfrom
shlomsh:bump-pdf-inspector-1.20
Open

shlomsh wants to merge 1 commit into
firecrawl:mainfrom
shlomsh:bump-pdf-inspector-1.20

Conversation

@shlomsh

@shlomsh shlomsh commented Sep 15, 2026

Copy link
Copy Markdown

Closes #170.

pdf-inspector 1.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 in pdf-inspector 1.16.0 on 2026-08-21, but @firecrawl/anydoc-wasm 0.2.4 (published after that) still locks 1.14.2, so a plain npm install reproduces the bug.

This bumps Cargo.toml to 1.20.0 (current release) and regenerates Cargo.lock with cargo update -p pdf-inspector; lopdf moves 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:

Checked locally, matching ci.yml: cargo clippy --workspace --all-targets --all-features -- -D warnings clean, cargo test --locked green (286 + 1 + 9 tests), cargo check --workspace builds anydoc-wasm and anydoc-python on the new lock.

Happy to adjust the version pin if you'd rather take 1.16 as the floor than 1.20.0.


Summary by cubic

Bumps pdf-inspector from 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.

  • lopdf moves 0.42 → 0.45 as a transitive update.
  • The one snapshot change (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.
  • Published @firecrawl/anydoc-wasm 0.2.4 still pins 1.14.2, so this affects source builds only.

Written for commit 3863d52. Summary will update on new commits.

Review in cubic

…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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

anydoc-wasm still ships pdf-inspector 1.14.2 — the RTL extraction fix (pdf-inspector#440) isn't included

1 participant