🐛 Bug-Fixes
-
Parentheses, brackets, «» and the other mirrored characters face the right way in right-to-left text: (א) used to be drawn )א(. Bracket pairs now take the direction of what they enclose, as a browser lays them out, and the invisible bidi controls (U+2066–U+2069, U+202A–U+202E, the marks U+200E, U+200F, U+061C) are no longer drawn as boxes.
-
A simple signature with a ca_chain – the first example in Encryption and signing – signs. The chain was read and parsed, then handed to pyHanko as file names, and every such signature failed with “expected str, bytes or os.PathLike object, not Certificate”.
-
A pkcs11 signature that names its token with token_label works with pyHanko 0.37, which removed open_pkcs11_session(token_label=...); the label now goes through token_criteria.
-
A table row that fits no page – such as a row with a long text in a narrow column that would fit a page alone but not under the repeated header – is cut between pages and goes on under the header, instead of stopping the whole render with LayoutError: ... too large on page. Content wider than the cell does not stop the cut either. A row crossed by a rowspan still fails as before.
-
A long table in a document with pdf:pagecount or pdf:toc no longer keeps every part of it already drawn until the end. Each part that went on to the next page was remembered, with the rest of its table, to be undone between passes; it is remembered weakly now. A 500-row report peaked at 58 MB instead of 166 MB, with the same PDF.
-
Right-to-left text is put in the order it is drawn one line at a time, after the lines are broken, instead of one fragment at a time before. A paragraph of several lines had its last words on its first line, and an entity (—, «) or an inline tag such as
< b >in the middle of a sentence split it into halves that came out the wrong way round. The text itself now keeps the order it was written in, so the PDF outline and the document title are no longer stored reversed. -
Dashed and dotted borders on table cells are drawn dashed and dotted. The squared line ends a table border is stroked with closed up every gap, so they always came out as solid lines.
⚠️ Deprecation
- pyHanko 0.37.0 and pyhanko-certvalidator 0.32.1 are the minimum versions; the declared floor was pyHanko 0.12.1, which nothing tested. pyHanko 0.37 fetches revocation data and timestamps with aiohttp and no longer installs requests.
🧹 Cleanup
- python-bidi is no longer a dependency. The Unicode Bidirectional Algorithm is implemented in xhtml2pdf/bidi.py, in pure Python on top of unicodedata, and passes the whole of the Unicode conformance suites (tools/bidi/conformance.py). python-bidi has been a compiled Rust extension since 0.5, which needed a wheel for every platform, and it reordered without mirroring, which is the bug above.
Full Changelog: v0.2.23...v0.2.24