pypi fpdf2 2.8.1
FPDF.bezier() to render quadratic and cubic Bézier curves, and many improvements

one month ago

Note: a temporary 2.8.0 version was released but then erroneously removed on Pypi.
Versions 2.8.0 & 2.8.1 are exactly the same.

Added

  • support for escape character for markers in markdown text issue #1215
  • Wrapping words on spaces now considers all common space symbols in addition to regular spaces (' '), addressing issues with word-wrapping for languages like Thai, as per #1190 and #1191.
  • Templates can now be also defined in JSON files.
  • support to optionally set wrapmode in templates (default "WORD" can optionally be set to "CHAR" to support wrapping on characters for scripts like Chinese or Japanese) - cf. #1159 - thanks to @carlhiggs
  • support for quadratic and cubic Bézier curves with FPDF.bezier() - thanks to @awmc000
  • documentation on how to use fpdf2 with Rough.js: link to docs
  • documentation on how to use fpdf2 with gunicorn: link to docs
  • feature to identify the Unicode script of the input text and break it into fragments when different scripts are used, improving text shaping results
  • FPDF.image(): now handles keep_aspect_ratio in combination with an enum value provided to x
  • FPDF.write_html(): now supports CSS page breaks properties : documentation
  • FPDF.write_html(): new optional font_family parameter to set the default font family
  • FPDF.write_html(): spacing before lists can now be adjusted via the tag_styles attribute - thanks to @lcgeneralprojects
  • file names are mentioned in errors when fpdf2 fails to parse a SVG image

Fixed

Removed

  • an obscure and undocumented feature of FPDF.write_html(), which used to magically pass instance attributes as arguments.

Deprecated

  • fpdf.TitleStyle has been renamed into fpdf.TextStyle
  • FPDF.write_html(): tag_indents introduced in the last version - Now the indentation can be provided through the tag_styles parameter, using the .l_margin of TextStyle instances

Changed

  • FPDF.circle() : the previous r parameter, that in fact defined the diamter, has been replaced by a new radius paremeter. The x & y parameters now define the circle center, instead of its top-left corner as it used to be - issue #1245
  • FPDF.table() now raises an error when a single row is too high to be rendered on a single page
  • FPDF.write_html(): indentation of HTML elements can now be non-integer (float), and is now independent of font size and bullet strings.
  • improved performance of font glyph selection by using functools cache
  • New translation of the tutorial in Türkçe, thanks to @Natgho: Türkçe;

Don't miss a new fpdf2 release

NewReleases is sending notifications on new releases.