github py-pdf/fpdf2 2.6.0
HTMLMixin not needed anymore - more HTML tags supported - demonstration Jupyter notebook

latest releases: 2.8.1, 2.7.9, 2.7.8...
24 months ago

Added

Deprecated

  • HTMLMixin is deprecated, and not needed anymore: the write_html() method is now natively available in the FPDF class - thanks to @yk-jp

Removed

  • open() & close() methods, that were only used internally and should never have been called by end-user code

Fixed

  • after an "empty" cell(), ln() applied a line height of zero #601
  • when using multi_cell() with max_line_height to render multiline text, the last line is now rendered like all the others
  • templates don't leak graphics state changes to their surroundings anymore; #570
  • automatic page break is never performed on an empty page (when the Y position is at the top margin)
  • fixed insert_toc_placeholder() usage with footer() and {{nb}}; #548
  • the SVG parser now accepts stroke-width attribute values with an explicit unit, thanks to @gmischler; #526
  • the SVG parser now accepts absolute units for width and height attributes, thanks to @darioackermann; #555
  • write_html() method now correctly handles whitespace when parsing HTML. <pre></pre> blocks still maintain spaces, tabs and line breaks.

Changed

  • the first parameter of FPDF.add_font() is now optional: if it is not provided, the base name of the fname font path is used to define the font family. Hence pdf.add_font(fname="fonts/NotoSansArabic.ttf") will define a font named NotoSansArabic.
  • the output of embed_file() is now a PDFEmbeddedFile, not a string, but the internal file name can be retrieved through its .basename property
  • forbid use of get_y() & local_context() inside unbreakable() as it is currently not supported; #557
  • fontTools minimal version requirement set to 4.34.0; #524

Don't miss a new fpdf2 release

NewReleases is sending notifications on new releases.