PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Oct 22, 2017 3:16 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue May 24, 2016 4:39 pm 
Offline

Joined: Tue May 24, 2016 4:27 pm
Posts: 2
For a lot of PDF pages I get a SharpZipBaseException when calling XGraphics.FromPdfPage.
The exception is thrown in InflaterInputStream.Fill() with message "Unexpected EOF".

I can 'fix' this problem using a hack in InflaterInputStream.Read:

Code:
....
if (inf.IsNeedingInput)
{
    try
    {
        Fill();
    }
    catch(SharpZipBaseException)
    { // WB! early EOF: apparantly not a big deal for some PDF pages: break out of the loop.
        break;
    }
}
...



Attachments:
File comment: Example file that needs the fix for all pages.
Suite - Corelli - Viool 1 nieuw.zip [54.33 KiB]
Downloaded 89 times
Top
 Profile  
Reply with quote  
PostPosted: Tue Aug 16, 2016 1:12 pm 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2720
Location: Cologne, Germany
Thanks for the patch and the test PDF.
I included it in the current internal build.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group