PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 10:01 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jul 04, 2013 7:06 am 
Offline

Joined: Thu Jul 04, 2013 6:45 am
Posts: 2
Hello,
first of all, thank you very much for your great library! It's working great except for one problem I have.
I have one pdf file that is not really large (16 pages, 530 kB). However when I open this file as a new
pdfdocument object

Code:
        Dim pdf As PdfSharp.Pdf.PdfDocument = PdfSharp.Pdf.IO.PdfReader.Open("C:\Users\Keex\Desktop\test\test.pdf",PdfSharp.Pdf.IO.PdfDocumentOpenMode.Import)


then in the course of seconds 1.5 GB of memory is allocated by my program. This usually ends in OutOfMemory-Exceptions when I'm doing anything else with the object. The weird thing is, that I noticed this behaviour only for this pdf-file while other files work nicely.
Did I miss anything obvious or can I at least predict, which files will show this behaviour?

You can find the pdf in question here (could not attach it directly, sorry):
http://www.students.uni-marburg.de/~Wallauej/plasma.pdf

Thank you in advance. Any help is very much appreciated :-)

Best regards
Keex


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 04, 2013 9:49 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3092
Location: Cologne, Germany
Hi!

Memory usage for that file is really very high.
The DEBUG build shows inconsistency warnings (IREF without value).

I opened the file with Adobe Reader XI, but it was not able to save the file (using File => Save as) - it shows an error message.

Adobe Reader cannot show the document properties (nothing happens with Ctrl+D).

The PDF Reader app that comes with Windows 8 cannot read the file at all.

Firefox shows a black screen and a circle of death when I try to open the file with it (memory usage 1.2 GB).

Long story short: the file is corrupt, but I cannot say what's wrong with it.
Maybe you can try "Save as" with other Reader versions, maybe you can open and save with Adobe Acrobat (currently I don't have it installed on my computer).

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Jul 04, 2013 11:01 am 
Offline

Joined: Thu Jul 04, 2013 6:45 am
Posts: 2
Ah I see. I converted the file from a standard journal article before so I guess the converter messed things up a little. I think I will contact the author of the converter and see if he has an idea.

Thank you very much for your help. Your debug message may be very helpful in narrowing the problem down. If I find out what caused it I will let you know so maybe you can prevent this obviously undesired behaviour in future builds.

All the best
Keex


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 43 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:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group