-
-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hello,
Thanks for the code, it allowed me to very quickly render PDF in Django.
One thing I could not do with your latest release is to resize images in a PDF. I looked around, and found the presentation_hints parameter that can be passed in the "HTML" or "write_pdf". I updated the last lines of renders.py file from
html = select_template(template).render(context)
HTML(string=html, base_url="not-used://", url_fetcher=url_fetcher,).write_pdf(
target=file_,
)
to
html = select_template(template).render(context)
HTML(string=html, base_url="not-used://", url_fetcher=url_fetcher,).write_pdf(
target=file_, presentation_hints = True,
)
And now I can use width / height to resize the images that are included in my template.
I'll leave it to you to update or add another setting somewhere to allow this.
Thanks again.
Metadata
Metadata
Assignees
Labels
No labels