pypi fpdf2 2.5.2
new_x/new_y, highlight annotations, text_mode & blend_mode

latest releases: 2.7.9, 2.7.8, 2.7.7...
2 years ago

Added

  • new parameters new_x and new_y for cell() and multi_cell(), replacing ln=0, thanks to @gmischler
  • new add_highlight() method to insert highlight annotations: documentation
  • new offset_rendering() method: documentation
  • new .text_mode property: documentation
  • the page structure of the documentation has been revised, with a new page about adding text, thanks to @gmischler
  • a warning is now raised if a context manager is used inside an unbreakable() section, which is not supported

Changed

  • local_context() can now "scope" even more properties, like blend_mode: documentation

Fixed

  • No font properties should be leaked anymore after using markdown or in any other situations (#359, thanks to @gmischler
  • If multi_cell(align="J") is given text with multiple paragraphs (text followed by an empty line) at once, it now renders the last line of each paragraph left-aligned, instead of just the very last line #364, thanks to @gmischler
  • a regression: now again multi_cell() always renders a cell, even if txt is an empty string - cf. #349
  • a bug with string width calculation when Markdown is enabled - cf. #351
  • a few bugs when parsing some SVG files - cf. #356, #358 & #376

Deprecated

  • The parameter ln to cell() and multi_cell() is now deprecated, use new_x and new_y instead.
  • The parameter center to cell() is now deprecated, use align="C" instead.
  • a bug when using multi_cell(..., split_only=True) inside an unbreakable section - cf. #359

Displaying deprecation warnings

DeprecationWarnings are not displayed by Python by default.

Hence, every time you use a newer version of fpdf2, we strongly encourage you to execute your scripts
with the -Wd option (cf. documentation)
in order to get warned about deprecated features used in your code.

This can also be enabled programmatically with warnings.simplefilter('default', DeprecationWarning).

Don't miss a new fpdf2 release

NewReleases is sending notifications on new releases.