Compress PDF
-
Hi everyone,
We use the PDF generated to send by email, but in some cases, the PDF is bigger the email has a limit for size files attached, so we can’t the PDF.
Actually we are exploring to compress or reduce the images but we don’t have the way yet or simple examples to do it.
But exists some extensions or script or options or engine to render or recipe with chrome_pdf to do that?
Please if somebody knows or the way to start the solutions, we are gratefully for that.
Best regards,
Denis
-
Here is an example of how to use async helper to resize images.
Does it help?
https://jsreport.net/learn/templating-engines#asynchronous-helpers
-
Yes, it's exactly that. Thanks so much @jan_blaha
-
I’ve been looking into this as well. While using the pdf-utils and adjusting the pdfSettings in the configuration is the standard way to handle it within jsreport, sometimes the compression isn't as aggressive as I need for certain documents.
If you're just looking for a quick way to shrink a file down before sending it off and don't want to mess with the server-side code right now, I've found this tool pretty handy- https://www.thetoolapp.com/compress-pdf-file/. It’s been a life-saver for me when I'm in a rush.
Curious to see if anyone else has managed to get significantly smaller file sizes just by tweaking the internal jsreport chrome-pdf settings though!