Open Clock-Speed opened 8 months ago
Hi @Clock-Speed and welcome!
Thank you very much for the feature proposal, which seems very relevant to me, and for the PR! 👍
Hey there @Lucas-C thanks for the warm welcome!
I was just wondering, if/when the PR does get merged, how far off do you think it'd be till it is included in a PyPy deployment?
I was just wondering, if/when the PR does get merged, how far off do you think it'd be till it is included in a PyPy deployment?
You mean the delay it will take for this feature to appear in a new fpdf2
release?
Given that we had a release a few days ago, I'd say in 4 to 6 weeks.
Ah dang, I really wanted to use it in one of my projects, no worries though. Any advice on how to go about making a release for internal use while we wait for it to be included in an actual release?
Ah dang, I really wanted to use it in one of my projects, no worries though. Any advice on how to go about making a release for internal use while we wait for it to be included in an actual release?
You can easily install a version of fpdf2
from any branch on any repo:
pip install git+https://github.com/py-pdf/fpdf2.git@master
So you can even install your PR branch:
pip install git+https://github.com/Clock-Speed/fpdf2.git@template-keep-aspect-ratio
Oh cool, you learn something new every day! :)
PR https://github.com/py-pdf/fpdf2/pull/1119 has been closed.
This issue is up-for-grabs! 🙂
Hey everyone! Been really liking this project so far but it's missing one feature that would make it awesome for my use case.
I would like the ability to insert images into a template where the images are scaled while maintaining the aspect ratio. This is already possible when adding an image directly to a PDF but the functionality is missing when using templates.
The solution I propose would introduce a new optional boolean field for the templates that allows for the use of the
keep_aspect_ratio
flag for images. The usage could look like the following example:Having looked through the code this should be quite simple as the image handler for templates simply calls the image function on the pdf, so the flag can just be passed through.
Unfortunately, I do not currently have the time to make the PR myself due to other commitments but would love to see this implemented!Ended up doing the PR myself anyways as the change was quite easy.Thanks!