pdf-metadata-editor icon indicating copy to clipboard operation
pdf-metadata-editor copied to clipboard

Editing title and author blows up file size from 2 MB to 14 MB

Open melyux opened this issue 2 years ago • 4 comments

I used the app to simply add a title and an author to a PDF file. Upon saving, the file size had changed and become much larger. Why is the content of the PDF changing when it's supposed to only be changing the metadata?

melyux avatar Jul 19 '23 10:07 melyux

@melyux It is not supposed to change. Is it possible that you provide a file with which this occurs ?

zaro avatar Jul 20 '23 08:07 zaro

@zaro Sure, I can send it to the email on your blog

melyux avatar Jul 20 '23 09:07 melyux

@melyux I spent almost all day trying to pinpoint where this problem comes. But definitely it's something related to Apache PDFBox.

The problem is even if I find what causes it I am not sure how to approach fixing it. The version of PDFBox the editor uses is really old 1.8, but newer versions support only the newer PDF/A spec, and are not usable for generic metadata editing.

Will keep you updated if I find something more.

zaro avatar Jul 26 '23 10:07 zaro

Bless you. What about using exiftool as the internal tool?

melyux avatar Jul 27 '23 02:07 melyux