Skip to content

v0.8.4

Choose a tag to compare

@Detective-XH Detective-XH released this 21 Jun 10:37
· 58 commits to master since this release
v0.8.4
a34e74e

Fixed

  • Page.Words() and Page.Tables() now read proportional glyph widths for composite (Type0) fonts that declare a uniform default width but also carry a per-character width array — common for Latin/Cyrillic (and other alphabetic) text wrapped in a Type0/Identity-H subset font, especially in non-US statistical PDFs. Previously every glyph was given the uniform default advance, so a long row label drifted into the adjacent right-aligned number and the two were welded character-by-character (for example a label instituce and a value 483 extracted as institu4c8e3). Across a fresh multilingual corpus this character-interleaving dropped sharply and net extracted numeric content rose; ruled tables, CJK tables, and the character set of Page.Words() are byte-for-byte unchanged. Composite fonts with a non-Identity encoding, and the degenerate zero-default-width case, are unaffected.
    • Known limitation: because this adjusts glyph positions on every page, a minority of documents may extract worse — specifically a banded table whose rows can be re-bucketed by the more-accurate positions; the font widths are correct, the sensitivity is in banded-table reconstruction, which remains best-effort.

Docs: the Page.Tables() scope in README/EXAMPLES is brought current (fully-ruled + rect-bordered locked classes; stroke-free per-cell-grid reconstruction + proportional Type0/Identity-H text as best-effort/improving; banded/borderless out of documented scope).