pypi fpdf2 2.8.9
Improved PDF standards compliance, page number alias substitution, and rendering, plus other bug fixes

3 hours ago

[2.8.9] - 2026-09-29

Added

Fixed

  • escaped Markdown markers adjacent to emphasis markers in link labels no longer lose literal characters or apply unintended styling
  • PDF serialization of boolean and null values: booleans in arrays and dictionaries now use lowercase true and false, including in mixed numeric/boolean arrays; None in arrays is serialized as null; and filtering empty dictionary fields preserves False and numeric zero values - thanks to @agustin18
  • SVG percentage width and height values with surrounding whitespace (e.g. width="100% ") no longer raise ValueError - thanks to @Anai-Guo
  • PDF/A-1 documents using TrueType or CFF-based CID fonts now include a /CIDSet stream in each font descriptor, as required by ISO 19005-1 (veraPDF rule 6.3.5-3) - cf. issue #88
  • split font /ToUnicode and /Encoding CMap mappings into blocks of at most 100 entries, as required by the PDF specification - cf. issue #1952
  • visual gap in rendering subsequent text after {nb} page alias when text shaping is enabled - cf. issue #1090 - thanks to @prateek-dagar
  • FPDF.write_html() no longer raises IndexError: pop from empty list when a <ul> or <ol> element carries a line-height that is not a bare number (e.g. line-height: normal or line-height: 1.5em); such values are now ignored, and the default line height is used, consistently with <p line-height="x"> - thanks to @Anai-Guo
  • FPDF.write_html() now renders list bullets with correct font styling instead of inheriting preceding heading (e.g. <h1>) styles - cf. issue #1921 - thanks to @prateek-dagar
  • table cells landing in the wrong column when a row was covered by several rowspans that did not start in column order - cf. issue #1948
  • Padding.new() now accepts 1-element sequences per CSS shorthand rules and preserves existing Padding instances without redundant allocations

Changed

  • Refactored _tt_font_widths to reuse _cid_font_widths glyph interval compression logic - thanks to @agustin18

Don't miss a new fpdf2 release

NewReleases is sending notifications on new releases.