Skip to content

PDF changing on open and save? #184

Answered by ThomasHoevel
oconnor0 asked this question in Q&A
Discussion options

You must be logged in to vote
  1. Currently there is no way to prevent this with PDFsharp. With support for "Incremental Updates" there will be a way to reduce the differences.
  2. There is no easy way.

PDFsharp reads everything into memory and writes a completely new file on saving. Some orphaned objects may be dropped in that process.
Parts of PDF files are zipped. This is a lossless process, but size can change if an object is unzipped and re-zipped.
PDFsharp does not support XREF streams, but that usually leads to larger PDF files after saving.

It is normal that the file size changes.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oconnor0
Comment options

Answer selected by oconnor0
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