Skip to content
Discussion options

You must be logged in to vote

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:

  1. page.clean_contents() always makes a new page /Contents stream. This will bloat the data delta when saving incrementally - a simple NO GO.
  2. There is page.wrap_contents() (written by me 😉) which adds 2 small /Contents objects: q before and Q after the existing contents…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@aarthihWN
Comment options

@JorjMcKie
Comment options

@aarthihWN
Comment options

Answer selected by aarthihWN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants