PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Apr 26, 2018 7:54 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 7 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 119 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: 2811
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  
PostPosted: Mon Jan 29, 2018 6:55 am 
Offline

Joined: Wed Jan 24, 2018 5:33 pm
Posts: 8
Hi, I'm getting the same exception with the same file. How can I use the above patch in order to fix it?


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 29, 2018 9:09 am 
Offline
empira Employee
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 2811
Location: Cologne, Germany
rogdo wrote:
How can I use the above patch in order to fix it?
Download the source code, make the change, compile, enjoy.
An adapted version of this patch is already included with beta 5.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 29, 2018 5:50 pm 
Offline

Joined: Wed Jan 24, 2018 5:33 pm
Posts: 8
Thomas, first of all thank you - I installed the new version of pdfsharp for wpf and it solved many problems.

However, now I get a new error now when i try to install my published app - it says:

"unable to install or run the application. the application requires that assembly pdfsharp-wpf version 1.32.2608.0 be installed in the Global Assembly Cache (GAC)"

Any idea?

sorry for nagging :(


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 29, 2018 9:39 pm 
Offline

Joined: Wed Jan 24, 2018 5:33 pm
Posts: 8
I was able to solve this issue.

I changed pdfsharp-wpf and charting to be included (instaed of prerequisite) and then put them under a new download group.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 05, 2018 6:57 pm 
Offline

Joined: Wed Jan 24, 2018 5:33 pm
Posts: 8
correction - needed to exclude those files


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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