[2.8.6] - 2026-02-18
Added
- support for
FPDF.transform()context manager to apply geometric transformations (translation, rotation, scaling, skewing) to the current graphics state - thanks to @RaphaelFLT - support for SVG
<linearGradient>and<radialGradient>elements - cf. issue #1580 - thanks to @Ani07-05 - mypy and pyright checks in the CI pipeline to enforce strict typing
- support WOFF and WOFF2 fonts - thanks to @BharathPESU
- TTC/OTC face selection via
collection_font_numberinadd_font() - CID-keyed CFF font embedding support
- Microsoft Symbol font remapping for non-Unicode cmaps
- support for EBDT/EBLC bitmap fonts
Fixed
- the
A5value that could be specified as pageformatto theFPDFconstructor was slightly incorrect, and the corresponding page dimensions have been fixed. This could lead to a minor change in your documents dimensions if you used thisA5page format. - cf. issue #1699 - a bug when rendering empty tables with
INTERNALlayout, that caused an extra border to be rendered due to an erroneous use oflist.index()- cf. issue #1669 - edge cases where tiny floating-point drift could trigger incorrect behaviour like issue #1393
- parentheses are now escaped in more places. This fixes embedding a file with a single parenthesis in the filename, but might also have impacts on e.g. section names.
- parsing markdown sequences with escape character - cf. issue #1236 - thanks @amidou-naba
Changed
- improved performance when rendering paths, SVGs, and opaque raster images with an alpha channel - cf. PR #1675
- typing annotations added across the codebase as part of the strict typing rollout
- graphics state snapshots now use a
GraphicsStatedataclass dataclass for clearer usage and stronger typing rotation(),skew(), andmirror()now delegate totransform()for standardized transform application- ImageInfo now uses typed dictionaries for clearer usage and stronger typing