4470 shaares
1 résultat
taggé
deprecation
Added
- new parameters
new_xandnew_yforcell()andmulti_cell(), replacingln=0, thanks to @gmischler - new
add_highlight()method to insert highlight annotations: documentation - new
offset_rendering()method: documentation - new
.text_modeproperty: documentation - the page structure of the documentation has been revised, with a new page about adding text, thanks to @gmischler
- a warning is now raised if a context manager is used inside an
unbreakable()section, which is not supported
Changed
local_context()can now "scope" even more properties, likeblend_mode: documentation
Fixed
- No font properties should be leaked anymore after using markdown or in any other situations (cf. #359), thanks to @gmischler
- If
multi_cell(align="J")is given text with multiple paragraphs (text followed by an empty line) at once, it now renders the last line of each paragraph left-aligned,
instead of just the very last line (cf. #364), thanks to @gmischler - a regression: now again
multi_cell()always renders a cell, even iftxtis an empty string - cf. #349 - a bug with string width calculation when Markdown is enabled - cf. #351
- a few bugs when parsing some SVG files - cf. #356, #358 & #376
- a bug when using
multi_cell(..., split_only=True)inside anunbreakablesection - cf. #359
Deprecated
- The parameter
lntocell()andmulti_cell()is now deprecated, usenew_xandnew_yinstead. - The parameter
centertocell()is now deprecated, usealign="C"instead.
Displaying deprecation warnings
DeprecationWarnings are not displayed by Python by default.
Hence, every time you use a newer version of fpdf2, we strongly encourage you to execute your scripts
with the -Wd option (cf. documentation)
in order to get warned about deprecated features used in your code.
This can also be enabled programmatically with warnings.simplefilter('default', DeprecationWarning).