PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unhandled exception opening pdf files, possible bug.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
xpehybcem



Joined: 28 Mar 2008
Posts: 2

PostPosted: Wed Apr 02, 2008 2:28 pm    Post subject: Unhandled exception opening pdf files, possible bug. Reply with quote

Hi,

I think I found a bug. I cannot open PDF files generated by PDF-XChange.
I get this assertion:

Unhandled Exception: PdfSharp.Pdf.IO.PdfReaderException: Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6.

at PdfSharp.Pdf.IO.Parser.ReadXRefTableAndTrailer(PdfReferenceTable xrefTable) in Parser.cs:line 741
at PdfSharp.Pdf.IO.Parser.ReadTrailer() in Parser.cs:line 718
at PdfSharp.Pdf.IO.PdfReader.Open(Stream stream, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider passwordProvider) in PdfReader.cs:line 275
at PdfSharp.Pdf.IO.PdfReader.Open(String path, String password, PdfDocumentOpenMode openmode, PdfPasswordProvider provider) in PdfReader.cs:line 200
at PdfSharp.Pdf.IO.PdfReader.Open(String path) in PdfReader.cs:line 216 at ProtectDocument.Program.Main(String[] args)

I can open these files in Acrobat 8 without any problems. To make it work, I converted the PDF files to the PostScript format and then used the Acrobat Distiller to create the pdf files and it works, but it takes many steps. It would be nice to work with those files using PdfSharp directly.

How can I fix this?

Thanks in advance.
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Wed Apr 02, 2008 3:00 pm    Post subject: Reply with quote

Hello!

We can only fix it if we can replicate it.
Therefore we need a PDF file that causes this error (I'll send you an email address via PM).
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Thu Apr 03, 2008 3:23 pm    Post subject: Re: Unhandled exception opening pdf files, possible bug. Reply with quote

Hello!
xpehybcem wrote:
Unhandled Exception: PdfSharp.Pdf.IO.PdfReaderException: Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6.

I should have read your post more carefully. Embarassed

This is not a bug, but a new PDF feature that is not yet supported in PDFsharp.
Cannot tell you when it'll be supported. Crying or Very sad

If you create those files yourself: create files for Adobe Reader 5.0 to avoid this new, unsupported feature.
If these are 3rd party PDF files, ask for Reader 5.0 compatible versions or try to automize your conversion.

I cannot fix PDFsharp and I can't tell you how to fix it.
I hope this helps anyway.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
xpehybcem



Joined: 28 Mar 2008
Posts: 2

PostPosted: Tue Apr 08, 2008 5:13 pm    Post subject: Reply with quote

Thomas,

You have been very helpful. I generated the files using the Acrobat 5 compatibility option and was able to modify files directly using PDFSharp.

Thanks again!!!.
Back to top
View user's profile Send private message
DavesNotHere



Joined: 02 Apr 2009
Posts: 2

PostPosted: Thu Apr 02, 2009 6:33 pm    Post subject: Reply with quote

I am having the same issue, oddly almost exactly a year after xpehybcem. Has this been resolved be the newest version (1.20 I think). I have an older version and didn't know if simply upgrading would solve my problem. Thanks.
Back to top
View user's profile Send private message Visit poster's website
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Tue Apr 07, 2009 8:10 am    Post subject: Reply with quote

AFAIK this is not yet fixed with version 1.20.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
DavesNotHere



Joined: 02 Apr 2009
Posts: 2

PostPosted: Wed Apr 08, 2009 12:44 pm    Post subject: Reply with quote

Not a huge problem. I did find a work around in this case, the Reduce File Size option worked for me.

Thanks for keeping an eye on it.
Back to top
View user's profile Send private message Visit poster's website
nwebster



Joined: 04 May 2009
Posts: 13

PostPosted: Wed Jun 03, 2009 3:25 pm    Post subject: Reply with quote

What is really odd about this is that when I run this on my local machine, it works fine. But when I move it to our production server, it doesn't work. Has anyone come across this situation?

Edit: I was able to edit the pdf file in a hex editor and change the version from 1.5 to 1.4 and then pdfsharp handled it fine on all machines.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com