Replies: 2 comments 6 replies
-
See also bug #1910 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
pypdf makes larger output files than gs
I trimmed it down to a simple page with small files. In some cases the bloat is much more severe.
gs-output.pdf
pypdf-output.pdf
test-input.pdf
import pypdf ; pdfwrite = pypdf.PdfWriter() ; page = pdfwrite.add_page(pypdf.PdfReader(open('test-input.pdf','rb')).pages[0]) ; page.compress_content_streams(level=9) ; pdfwrite.write(open('pypdf-output.pdf','wb'))
followed by
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=gs-output.pdf - < pypdf-output.pdf
Beta Was this translation helpful? Give feedback.
All reactions