Skip to content

Why not the same size with the original pdf when saving? #1821

Answered by JorjMcKie
tristone13th asked this question in Q&A
Discussion options

You must be logged in to vote

This may happen for a number of reasons.
First of all, even if you do nothing else than fitz.open(file);fitz.save(newfile), this is not equivalent to simply doing copy file -> newfile with the means of your OS. Like every PDF package, MuPDF will reconstruct the PDF during save.
So you must provide the save options you need. E.g. if the input was a linear PDF, the output won't be if you don't request it.
Second, while there is a range of garbage selection and fine-grained compression options, MuPDF does not support certain other compression features like creating /ObjStm objects.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tristone13th
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants