pypi fpdf2 2.4.0
JPEG storage improvements, basic Markdown styling & presentation transitions

latest releases: 2.8.1, 2.7.9, 2.7.8...
3 years ago

Changed

  • now fpdf2 uses the newly supported DCTDecode image filter for JPEG images,
    instead of FlateDecode before, in order to improve the compression ratio without any image quality loss.
    On test images, this reduced the size of embeded JPEG images by 90%.
  • FPDF.cell: the w (width) parameter becomes optional, with a default value of None, meaning to generate a cell with the size of the text content provided
  • the h (height) parameter of the cell, multi_cell & write methods gets a default value change, None, meaning to use the current font size
  • removed the useless w & h parameters of the FPDF.text_annotation() method

Added

  • new FPDF.add_action() method, documented in the Annotations section
  • FPDF.cell: new optional markdown=True parameter that enables basic Markdown-like styling: **bold**, __italics__, --underlined--
  • FPDF.cell: new optional boolean center parameter that positions the cell horizontally
  • FPDF.set_link: new optional zoom parameter that sets the zoom level after following the link.
    Currently ignored by Sumatra PDF Reader, but observed by Adobe Acrobat reader.
  • HTMLMixin / HTML2FPDF: now support align="justify"
  • new method FPDF.image_filter to control the image filters used for images
  • FPDF.add_page: new optional duration & transition parameters
    used for presentations (documentation page)
  • extra documentation on how to configure different page formats for specific pages
  • support for Code 39 barcodes in fpdf.template, using type="C39"

Fixed

  • avoid an Undefined font error when using write_html with unicode bold or italics fonts

Deprecated

  • the FPDF.set_doc_option() method is deprecated in favour of just setting the core_fonts_encoding property
    on an instance of FPDF
  • the fpdf.SYSTEM_TTFONTS configurable module constant is now ignored

Don't miss a new fpdf2 release

NewReleases is sending notifications on new releases.