Menu

#15 Trash after %%EOF

v1.0 (example)
closed
nobody
None
5
2013-05-13
2013-02-18
VorobeY1326
No

PDFSharp doesn't understand pdf files with something after %%EOF.
It's because of code searching for startxref (part of trailer) in last 131 symbols, but it can be before this 131 bytes.

But I'm not sure it's bug - strong specification says that %%EOF must be the last part of file.
More about it : http://stackoverflow.com/questions/11896858/does-the-eof-in-a-pdf-have-to-appear-within-the-last-1024-bytes-of-the-file .

But some C# pdf generators generates pdf with nulls after %%EOF.
I don't know, why they do so..

Discussion

  • PDFsharp Team

    PDFsharp Team - 2013-05-13

    Yes, we saw files that contained 50,000+ zero bytes at the end of the file (nearly 50 % of the PDF file were padding bytes).
    EOF stands for "End Of File".
    A simple change allows PDFsharp to search the whole file:
    http://forum.pdfsharp.net/viewtopic.php?p=583#p583

     
  • PDFsharp Team

    PDFsharp Team - 2013-05-13
    • status: open --> closed
    • Group: --> v1.0 (example)
     

Log in to post a comment.