page object compress_content_stream #2778
-
I am trying to use the compress_content_streams from page object in pypdf. As my generated pdf after filling forms is around 300MB, trying a lossless compression using this. I am not able to see any difference in the file size except few bytes from level = 0 to 9 I can see PyPDF2 v2.12.1 and lower version can do better compression. My output comes to around 70-80MB But from PyPDF2 v3.0.0, the compression does not work as expected. This corrupts the PDF files generated. PDF size increases from 300MB to 320MB pypdf compression does not corrupt files, but the compression is not much different from original file size. Size remains same around 300MB. Can I know what I am doing wrong please.
COMPRESS is a constant that holds boolean True or False Can someone explain the behaviour change between PyPDF2 v2.12.1 and pypdf please Thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Can you please provide a pdf file showing this issue. Without, no analyiss is possible |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I've reviewed the very old code and understand better now This gives me some new ideas to implement some tools to reduce pdf size. |
Beta Was this translation helpful? Give feedback.
-
issue #2794 has been generated for tracking |
Beta Was this translation helpful? Give feedback.
issue #2794 has been generated for tracking