Changed
- now
fpdf2
uses the newly supportedDCTDecode
image filter for JPEG images,
instead ofFlateDecode
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
: thew
(width) parameter becomes optional, with a default value ofNone
, meaning to generate a cell with the size of the text content provided- the
h
(height) parameter of thecell
,multi_cell
&write
methods gets a default value change,None
, meaning to use the current font size - removed the useless
w
&h
parameters of theFPDF.text_annotation()
method
Added
- new
FPDF.add_action()
method, documented in the Annotations section FPDF.cell
: new optionalmarkdown=True
parameter that enables basic Markdown-like styling:**bold**, __italics__, --underlined--
FPDF.cell
: new optional booleancenter
parameter that positions the cell horizontallyFPDF.set_link
: new optionalzoom
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 supportalign="justify"
- new method
FPDF.image_filter
to control the image filters used for images FPDF.add_page
: new optionalduration
&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
, usingtype="C39"
Fixed
- avoid an
Undefined font
error when usingwrite_html
with unicode bold or italics fonts
Deprecated
- the
FPDF.set_doc_option()
method is deprecated in favour of just setting thecore_fonts_encoding
property
on an instance ofFPDF
- the
fpdf.SYSTEM_TTFONTS
configurable module constant is now ignored