Hi!
JeIC2 wrote:
However, it is a legit PDF, as I can open it and read it.
The file is corrupt.
At position 164767 a stream begins. The length of the stream is given as 9979 bytes.
The size of the file is just 171690 bytes, so there are at most 6921 bytes content for that stream, not the 9979 given in the header.
I call that "corrupt".
Yes, Adobe Reader can open the file. And when I use "Save as" in Adobe Reader, I get a file that can be opened with PDFsharp.
Once again Adobe Reader does a better job when it comes to dealing with corrupt files. Adobe Reader sets the length of that stream to 390.
There are some pull requests on GitHub that are meant to improve how PDFsharp deals with corrupted files.
We did not evaluate those changes yet, so they are not included in beta5.
Feel free to try them and please let us know if any of those fixes helps with your file.
https://github.com/empira/PDFsharp/pullsQPDF also identifies the file as corrupt:
Quote:
checking 119406-VKF_926516_20171003_081415.pdf
PDF Version: 1.3
File is not encrypted
File is not linearized
WARNING: 119406-VKF_926516_20171003_081415.pdf (object 11 0, file position 174748): EOF while reading token
WARNING: 119406-VKF_926516_20171003_081415.pdf (object 11 0, file position 164769): attempting to recover stream length
WARNING: 119406-VKF_926516_20171003_081415.pdf (object 11 0, file position 164769): recovered stream length: 1859
It comes up with a different stream length than Adobe Reader.