HACKTOBERFEST! Detect oversized images, new methods to draw arcs & regular polygons, improved documentation
Added
-
New
FPDF.pages_count
property, thanks to @paulacampigotto -
Temporary changes to graphics state variables are now possible using
with FPDF.local_context():
, thanks to @gmischler -
a mechanism to detect & downscale oversized images, cf. documentation. Feedbacks on this new feature are welcome!
-
New
set_dash_pattern()
, which works with all lines and curves, thanks to @gmischler. -
Templates now support drawing ellipses, thanks to @gmischler
-
New documentation on how to display equations, using Google Charts or
matplotlib
: Maths -
The whole documentation can now be downloaded as a PDF: fpdf2-manual.pdf
-
New sections have been added to the tutorial, thanks to @portfedh:
-
New translation of the tutorial in Hindi, thanks to @Mridulbirla13: हिंदी संस्करण; Deutsch, thanks to @digidigital; and Italian thanks to @xit4; Русский thanks to @AABur; and português thanks to @fuscati; français, thanks to @Tititesouris
-
While images transparency is still handled by default through the use of
SMask
,
this can be disabled by settingpdf.allow_images_transparency = False
in order to allow compliance with PDF/A-1 -
FPDF.arc
: new method added to draw arcs in a PDF document. -
FPDF.solid_arc
: new method added to draw solid arcs in a PDF document. A solid arc combines an arc and a triangle to form a pie slice. -
FPDF.regular_polygon
: new method added, thanks to @bettman-latin
Fixed
- All graphics state manipulations are now possible within a rotation context, thanks to @gmischler
- The exception making the "x2" template field optional for barcode elements did not work correctly, fixed by @gmischler
- It is now possible to get back to a previous page to add more content, e.g. with a 2-column layout, thanks to @paulacampigotto
Changed
- All template elements now have a transparent default background instead of white, thanks to @gmischler
- To reduce the size of generated PDFs, no
SMask
entry is inserted for images that are fully opaque
(= with an alpha channel containing only 0xff characters) - The
rect
,ellipse
&circle
all have astyle
parameter in common.
They now all properly accept a value of"D"
and raise aValueError
for invalid values.
Deprecated
dashed_line()
is now deprecated in favor ofset_dash_pattern()