PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 12:47 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 
Author Message
PostPosted: Wed Apr 02, 2008 2:28 pm 
Offline

Joined: Fri Mar 28, 2008 4:49 pm
Posts: 2
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 3:00 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
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


Top
 Profile  
 
PostPosted: Thu Apr 03, 2008 3:23 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
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. :oops:

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. :cry:

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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 08, 2008 5:13 pm 
Offline

Joined: Fri Mar 28, 2008 4:49 pm
Posts: 2
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!!!.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 02, 2009 6:33 pm 
Offline

Joined: Thu Apr 02, 2009 6:30 pm
Posts: 2
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 07, 2009 8:10 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
AFAIK this is not yet fixed with version 1.20.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 08, 2009 12:44 pm 
Offline

Joined: Thu Apr 02, 2009 6:30 pm
Posts: 2
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 03, 2009 3:25 pm 
Offline

Joined: Mon May 04, 2009 12:45 pm
Posts: 13
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.


Top
 Profile  
 
PostPosted: Thu Aug 27, 2009 3:54 pm 
Offline

Joined: Tue Aug 25, 2009 7:26 pm
Posts: 5
I am too struggling with this. I am working with a pdf that can be opened with Acrobat 7.0 and later. The pdf version is 1.6. I am getting the error
'Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6.'

Has this been fixed or is there a workaround. Please let me know. I will appreciate your help.

I am using PDFSharp dll versionb 1.2.1269.0. I am using VB.Net. I don't have control on the version of the pdf.

Thanks


Top
 Profile  
 
PostPosted: Thu Oct 14, 2010 2:46 pm 
Offline

Joined: Thu Oct 14, 2010 2:42 pm
Posts: 1
Location: Brasil
Friend ... I'm having the same problem and using version 1.31.1789.0 of PdfSharp. The system is 64 bit (Vista 64). Already there is a solution to the problem?
If you need I can send the pdf file by e-mail PM.

Thanks and hope your help.

Flavio


Top
 Profile  
 
PostPosted: Thu Oct 14, 2010 3:42 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3095
Location: Cologne, Germany
There is a workaround suggested in this thread:
viewtopic.php?p=2860#p2860

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 

All times are UTC


Who is online

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