pyfpdf
pyfpdf copied to clipboard
Introducing a rect_clip() function
This is really useful to display only part of image.
Usage example:
with pdf.rect_clip(x=..., y=..., w=..., h=...):
pdf.image(filepath, x, y)
I can add tests if needed
it would probably be good to add docs as well, but im not the person who can accept pull requests on this fork of the project
Documentation added, thanks for the suggestion @alexanderankin!
Tested added:
$ python tests/cover/test_rect_clip.py --auto --check
OK
This was ported to fpdf2: https://github.com/alexanderankin/pyfpdf/blob/master/CHANGELOG.md#210---2020-12-07