mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-24 10:08:00 -06:00
A /ToUnicode CMap with any unparsable part made the reading path discard the whole map and fall back to the font encoding, so search and redaction missed text the edit layer could read. Vendor hayro-cmap 0.1.0 and patch it to skip malformed bfchar/bfrange entries, unresolvable usecmap references and unparseable tails, keeping every readable entry, matching MuPDF/pdftotext and PdfCraft's own edit-layer parser. Fixes #3177. Signed-off-by: Charan Rathore <180254320+charan-rathore@users.noreply.github.com>
805 B
805 B
hayro-cmap
A parser for cmap files, as they are found in PDFs.
This crate provides a parser for CMap files and allows you to
- Map character codes from text-showing operators to CID identifiers.
- Map CIDs to Unicode characters or strings.
Safety
This crate forbids unsafe code via a crate-level attribute.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.