Added
- support for soft-hyphen (
\u00ad
) break inwrite()
,cell()
&multi_cell()
calls - thanks @oleksii-shyman & @gmischler!
Documentation: Line breaks - new documentation page on Emojis, Symbols & Dingbats
- documentation on combining
borb
&fpdf2
: Creating a borb.pdf.document.Document from a FPDF instance
Changed
write()
now supports soft hyphen characters, thanks to @gmischlerfname
is now a required parameter forFPDF.add_font()
image()
method now insert.svg
images as PDF paths- the defusedxml package was added as dependency in order to make SVG parsing safer
- log level of
_substitute_page_number()
has been lowered fromINFO
toDEBUG
Fixed
- a bug when rendering Markdown and setting a custom
text_color
orfill_color
- a bug in
get_string_width()
with unicode fonts and Markdown enabled,
resulting in calls tocell()
/multi_cell()
withalign="R"
to display nothing - thanks @mcerveny for the fix! - a bug with incorrect width calculation of markdown text
Deprecated
- the font caching mechanism, that used the
pickle
module, has been removed, for security reasons,
and because it provided little performance gain, and only for specific use cases - cf. issue #345.
That means that thefont_cache_dir
optional parameter offpdf.FPDF
constructor
and theuni
optional argument ofFPDF.add_font()
are deprecated.
Thefpdf.fpdf.load_cache
function has also been removed.
To be extra clear: uni=True
can now be removed from all calls to FPDF.add_font()
.
If the value of the fname
argument passed to add_font()
ends with .ttf
, it is considered a TrueType font.