PDF compression #2782
Replies: 2 comments
-
At least it is no problem! But deflate=True will switch on the other two. Garbage option 3 searches all PDF objects (xrefs) and compares their definitions. If equal ones are found, one of the two is deleted and references to it are changed to point to the remaining one. Garbage option 4 in addition looks at so-called "streams" which is the PDF term for large data portions - usually binary content like images or fonts, but could be anything. Garbage collection options are arranged in a hierarchy: option |
Beta Was this translation helpful? Give feedback.
-
You may like to hear, that we intend to extend compression options with the next release of our base library MuPDF in spring of next year. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://pymupdf.readthedocs.io/en/latest/document.html#Document.save
What is the difference between
garbage=3
andgarbage=4
?If time delay is not an issue and max possible compression is the objective, should
garbage=4
be used?Also for max compression, should I just use
deflate=True
or also adddeflate_images=True
anddeflate_fonts=True
? Is it good practice?Beta Was this translation helpful? Give feedback.
All reactions