Skip to content

Unpin pdf-extract once the typst text-extraction regression is fixed #31

Description

@padamson

Background

pdf-extract is held at 0.10 as a dev-dependency (the PDF-verification
test harness, tests/pdf_callouts.rs). The bump to 0.12 — which pulls
the patched lopdf >=0.42 and so clears advisory RUSTSEC-2026-0187
regresses text extraction on typst-generated PDFs: glyphs come back
under a substitution cipher (e.g. theTSk), because 0.12 mishandles
the ToUnicode CMap of typst's subsetted fonts. That breaks the test's
content assertions.

Verified on the byte-identical book PDF: 0.10 extracts clean and passes;
0.12 garbles and fails.

Since lopdf is reachable only through this dev-dependency and only ever
parses our own trusted typst PDF (never untrusted input), the advisory has
no real exposure, so we suppressed it rather than take the breaking bump.
See 1bfd577.

Current holds (all need removing once upstream is fixed)

  • deny.toml[advisories] ignore = ["RUSTSEC-2026-0187"]
  • .cargo/audit.toml — same advisory ignore (for bare cargo audit)
  • .github/dependabot.ymlignore: pdf-extract under the cargo ecosystem
  • Cargo.tomlpdf-extract = "0.10" pin

Done-when

pdf-extract ships a release that pulls lopdf >=0.42 and extracts
typst PDF text correctly (or we switch the test to a different extractor).
At that point: bump pdf-extract, drop all four holds above, and confirm
tests/pdf_callouts.rs -- --ignored passes.

Related

Supersedes dependabot PR #30 (the bump we declined).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions