Closed Syntamin closed 3 months ago
Hi Syntamin,
Please keep in mind the Github issues are meant for bug reports and feature requests. If you have specific questions related to usage, please ask them using StackOverflow (such that the answer is more visible, and can be found by more people).
Anyway, related to your question: I would check out the class ImageFormatOptimization.
You see, in PDF, images can be displayed at a given size, and stored at a completely different size. So one way of performing image optimization is to scale down all the images (that are too large) such that they are the display format. And that's precisely what the aforementioned class does.
This would be a good entrypoint for you to explore borb
for your usecase.
Kind regards, Joris Schellekens
Hi Joris Schellekens,
Thank you very much for your response. If I encounter any problems in the future, I will ask questions on StackOverflow. I will also try to use ImageFormatOptimization to achieve my goal. Thanks again!
Hi,I want to achieve lossless compression of PDF size, for example, by extracting all images from the PDF and using pngquant to compress the images, then replacing the original images. In theory, can this library be used to achieve PDF size compression? Also, I haven't found an API to replace the original images.