View previous topic :: View next topic |
Author |
Message |
xpehybcem
Joined: 28 Mar 2008 Posts: 2
|
Posted: Wed Apr 02, 2008 2:28 pm Post subject: Unhandled exception opening pdf files, possible bug. |
|
|
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 |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Wed Apr 02, 2008 3:00 pm Post subject: |
|
|
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 |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Thu Apr 03, 2008 3:23 pm Post subject: Re: Unhandled exception opening pdf files, possible bug. |
|
|
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.
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.
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 |
|
|
xpehybcem
Joined: 28 Mar 2008 Posts: 2
|
Posted: Tue Apr 08, 2008 5:13 pm Post subject: |
|
|
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 |
|
|
DavesNotHere
Joined: 02 Apr 2009 Posts: 2
|
Posted: Thu Apr 02, 2009 6:33 pm Post subject: |
|
|
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 |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Tue Apr 07, 2009 8:10 am Post subject: |
|
|
AFAIK this is not yet fixed with version 1.20. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
DavesNotHere
Joined: 02 Apr 2009 Posts: 2
|
Posted: Wed Apr 08, 2009 12:44 pm Post subject: |
|
|
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 |
|
|
nwebster
Joined: 04 May 2009 Posts: 13
|
Posted: Wed Jun 03, 2009 3:25 pm Post subject: |
|
|
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 |
|
|
|