You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the official example and used the add_to_layer method to add a local image file to the page of a PDF file, but the final generated PDF file is particularly large! The size increased by 10 times. This is very strange. Do you have any ideas on how to solve this problem?
The original image file is 759 KB, and the final generated PDF file has become 10.3 MB.
Use release mode? Images are uncompressed in debug mode. Image compression is on by default in 0.8, I think I only needed it when I was debugging images in the early days of this library.
Well it's 5.2 MB with --release. Good, but not that much better. Technically we could use the JPXDecode filter (used to natively embed JPEGs into PDF), which would probably bring it close to the original (but at the loss of quality).
I followed the official example and used the add_to_layer method to add a local image file to the page of a PDF file, but the final generated PDF file is particularly large! The size increased by 10 times. This is very strange. Do you have any ideas on how to solve this problem?
The original image file is 759 KB, and the final generated PDF file has become 10.3 MB.
here is my code https://github.com/hahazexia/img2pdf
The text was updated successfully, but these errors were encountered: