pcorless / icepdf

PDF Rendering and Viewing API in Java
Apache License 2.0
84 stars 21 forks source link

Incorrect metadata #374

Closed igorrogov closed 1 week ago

igorrogov commented 1 week ago

Hello,

We are switching from the original icePDF 6.3.2 to this one 7.2.1. We found that some of our tests started to fail after the upgrade. It turned out that the new version doesn't extract correct metadata. In many cases the last character is stripped from the properties.

I have attached a sample PDF. See below a comparison between IcePDF and Adobe Reader:

image

Sample PDF: openoffice-1.1.5-writer.pdf

I have tried to debug it myself, but I couldn't figure out why it's removing the last character sometimes. It has something to do with the class HexStringObject as it seems.

pcorless commented 1 week ago

Thank you for pointing this one out. Looks like I broke it last year ago while working on document rewrites. I'll add some coverage on my end. I have a fix checked into main.

pcorless commented 1 week ago

Marking as fixed, will be in next release. Closing.

igorrogov commented 1 week ago

Thanks a lot!

pcorless commented 1 week ago

No problem. It nice to see some old users upgrading. Keep an eye out for 7.2.2, should be out in the next day or two.