deflate and garbage options not compressing file enough #2223
-
Hi Jorj, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The save options are ok - you might want to use garbage=4, which also removes any binary stream duplicates. A possible way out is not saving to a new file, but incrementally. Then only the update deltas are appended to the file - existing stuff remains untouched. This has a few consequences though:
So using incremental saves and using |
Beta Was this translation helpful? Give feedback.
The save options are ok - you might want to use garbage=4, which also removes any binary stream duplicates.
Other than that ...😒
MuPDF unfortunately does not yet support all PDF compression options (specifically
/ObjStm
object streams).A possible way out is not saving to a new file, but incrementally. Then only the update deltas are appended to the file - existing stuff remains untouched. This has a few consequences though:
page.clean_contents()
always makes a new page/Contents
stream. This will bloat the data delta when saving incrementally - a simple NO GO.page.wrap_contents()
(written by me 😉) which adds 2 small/Contents
objects:q
before andQ
after the existing contents…