github py-pdf/fpdf2 2.7.6
Improvements to FPDF.table() - Text regions layout management - several bugfixes

latest releases: 2.7.8, 2.7.7
6 months ago

This release is the first performed from the @py-pdf GitHub org, where fpdf2 migrated.
This release also marks the arrival of two new maintainers: Georg Mischler (@gmischler) and Anderson Herzogenrath da Costa (@andersonhc).

Added

Changed

  • The formatting output by write_html() has changed in some aspects. Vertical spacing around headings and paragraphs may be slightly different, and elements at the top of the page don't have any extra spacing above anymore.
  • FPDF.table(): If the height of a row is governed by an image, then the default vertical alignment of the other cells is "center". This was "top".
  • variable-width non-breaking space (NBSP) support issue #834
    This change was made for consistency between row-height governed by text or images. The old behaviour can be enforced using the new vertical alignment parameter.

Fixed

  • In multi_cells and table cells with horizontal padding, the text was not given quite enough space.
  • write_html() can now handle formatting tags within paragraphs without adding extra line breaks (except in table cells for now).
  • the font size in HTML <pre> and <code> tags is not fixed to 11 pica anymore, but adapts to the preceding text.
  • FPDF.ln(), when called before any text has been written, will now use the current font height instead of doing nothing - cf. issue #937
  • FPDF.image(), when provided a BytesIO instance, does not close it anymore - cf. issue #881
  • Invalid characters were being generated when a string contains parentheses - cf. issue #884
  • Frozen Glyph dataclass was causing problems for FPDFRecorder with TTF fonts - cf. issue #890
  • Edge case when parsing a Markdown link followed by a newline - cf. issue #916, and when bold/italics/underline markers are repeated
  • Zoom not set correctly when a numeric value was set in set_display_mode() - cf. issue #926
  • FPDF.table(): images no longer overlap with cell borders - cf. issue #892
  • Encryption of strings containing non-latin characters - cf. issue #933
  • Handling of fragments with zero-length - cf. issue #902

Deprecated

  • to improve naming consistency, the txt parameters of FPDF.cell(), FPDF.multi_cell(), FPDF.text() & FPDF.write() have been renamed to text

Don't miss a new fpdf2 release

NewReleases is sending notifications on new releases.