Added
- new method
FPDF.table()
: documentation FPDF.image()
has a newkeep_aspect_ratio
optional boolean parameter, to fit it inside a given rectangle: documentationFPDF.multi_cell()
andFPDF.write()
now accept awrapmode
argument for word or character based line wrapping ("WORD"/"CHAR").- new methods:
FPDF.preload_image()
&FPDF.use_font_style()
- new method
FPDF.set_fallback_fonts()
allow alternative fonts to be provided if a character on the text is not available on the currently set font - thanks to @andersonhc - ICC Profiles of included images are now extracted and turned into PDF objects; they should now be taken into account by PDF viewers - thanks to @eroux
- new translation of the tutorial in 简体中文 - thanks to @Bubbu0129
- documentation on how to embed static Plotly charts: link to docs
- additional linter / static code analyser in GitHub Actions CI pipeline: semgrep
Fixed
- outlines & hyperlinks were not working on encrypted files - thanks to @andersonhc
- a bug was introduced in the previous release (2.6.1):
FPDF.set_link()
could not update links generated withadd_link()
- unicode (non limited to ASCII) text can now be provided as metadata #685
- all
TitleStyle
constructor parameters are now effectively optional - memory usage was reduced by 10 MiB in some cases, thanks to a small optimization in using
fonttools
Changed
FPDF.write_html()
now uses the newFPDF.table()
method to render<table>
tags. As a consequence, vertical space before<table>
tags has sometimes been reduced.
- vector images parsing is now more robust:
fpdf2
can now embed SVG files withoutviewPort
or noheight
/width
- bitonal images are now encoded using
CCITTFaxDecode
, reducing their size in the PDF document - thanks to @eroux - when possible, JPG and group4 encoded TIFFs are now embedded directly without recompression - thanks to @eroux
Removed
FPDF.write_html()
now uses the newFPDF.table()
method to render<table>
tags. As a consequence, it does not support theheight
attribute defined on<td>
/<th>
tags anymore, norheight
/width
attributes defined on<img>
tags inside cells, norwidth
attributes defined on<thead>
/<tfoot>
tags.