This project has moved and is read-only. For the latest updates, please go here.
24

Closed

Cannot handle iref streams

description

PDFsharp is unable to load http://aspnetmvcbook.s3.amazonaws.com/aspnetmvc-nerdinner_v1.pdf
 
Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6. (in `PdfSharp')
at PdfSharp.Pdf.IO.Parser.ReadXRefTableAndTrailer (PdfSharp.Pdf.PdfReferenceTable xrefTable) [0x00000]
at PdfSharp.Pdf.IO.Parser.ReadTrailer () [0x00000]
at PdfSharp.Pdf.IO.PdfReader.Open (System.IO.Stream stream, System.String password, PdfDocumentOpenMode openmode, PdfSharp.Pdf.IO.PdfPasswordProvider passwordProvider) [0x00000]
at PdfSharp.Pdf.IO.PdfReader.Open (System.String path, System.String password, PdfDocumentOpenMode openmode, PdfSharp.Pdf.IO.PdfPasswordProvider provider) [0x00000]
at PdfSharp.Pdf.IO.PdfReader.Open (System.String path, PdfDocumentOpenMode openmode, PdfSharp.Pdf.IO.PdfPasswordProvider provider) [0x00000]
Closed Oct 15, 2015 at 12:45 PM by ThomasHoevel
PDFsharp 1.50 beta 2 (available on NuGet) can handle IREF streams.

Source code of PDFsharp 1.50 is still under development/review and was not published yet.

comments

StefanLange wrote Aug 12, 2009 at 7:36 PM

Yes, I know, this is the most wanted feature. We will fix (at least reading) iref streams as soon as possible.

See also: http://www.pdfsharp.net/wiki/IRef_Streams.ashx

adirajusr wrote Sep 14, 2009 at 7:37 AM

I have Acrobat 9.0 installed in my computer, the workaround suggested is to save it in Acrobat 5.0.
How to save the pdf doc from Ac 9.0 to 5.0? Please help..!

ThomasHoevel wrote Sep 23, 2009 at 1:59 PM

In Acrobat Professional 8 you can use Advanced -> PDF Optimizer.

wrote Oct 19, 2009 at 5:10 PM

bianco wrote Feb 4, 2010 at 11:37 AM

any news?

wrote Feb 17, 2010 at 7:16 PM

funduguyvarun wrote Mar 30, 2010 at 10:51 AM

The last comment from Stefan Lang was on Aug12, 2009.
Any update on this issue? when is iref stream(atleast reading) is going to be supported? Is there any other way to handle those PDFs?
I can use PDF_optimize from Acrobat as there are some features that arent supported by older versions of PDFs. How to handle those PDFs using PDFsharp?

funduguyvarun wrote Mar 30, 2010 at 10:51 AM

The last comment from Stefan Lang was on Aug12, 2009.
Any update on this issue? when is iref stream(atleast reading) is going to be supported? Is there any other way to handle those PDFs?
I can use PDF_optimize from Acrobat as there are some features that arent supported by older versions of PDFs. How to handle those PDFs using PDFsharp?

wrote Apr 5, 2010 at 2:40 PM

wrote Jun 15, 2010 at 9:26 PM

franksandersen wrote Jun 15, 2010 at 9:54 PM

Thanks for sharing this library with us! Any idea when we can expect a solution with this iref stream issue?

narayans wrote Nov 16, 2010 at 11:35 PM

I uploaded a patch for this and it turns out there are problems with stream decoding as well (DecodeParams is ignored). Have not heard back. I'm guessing this project has been abandoned.

kylebahrke wrote Nov 17, 2010 at 1:28 PM

I'm hoping it wasn't abandoned, the inability to handle iref streams forced us to make sure the PDF files we have were saved in version 5.0.

wrote Mar 30, 2011 at 12:41 PM

wrote Nov 15, 2011 at 9:42 AM

wrote Dec 9, 2011 at 3:39 PM

wrote Apr 12, 2012 at 10:19 PM

abelous wrote Apr 12, 2012 at 10:20 PM

Love the speed of the PdfSharp library. Unfortunately cannot use it until it can handle iref streams. Any ideas on if/when this will get implemented?

wrote Apr 18, 2012 at 11:12 PM

wrote May 24, 2012 at 2:33 PM

greenfire27 wrote May 29, 2012 at 9:20 PM

wrote Jul 31, 2012 at 6:51 PM

wrote Sep 2, 2012 at 1:10 AM

wrote Dec 13, 2012 at 7:26 AM

wrote Feb 22, 2013 at 1:12 AM

wrote Mar 8, 2013 at 8:25 AM

wrote Apr 2, 2013 at 8:08 AM

wrote May 24, 2013 at 9:01 PM

wrote Sep 12, 2013 at 1:15 PM

wrote Jan 10, 2014 at 12:00 PM

wrote Jan 17, 2014 at 6:23 PM

wrote Apr 17, 2014 at 9:12 AM

bjlewies wrote Apr 17, 2014 at 9:22 AM

Unfortunately I also fell victim to this restriction on one of my current projects. Although the workaround might functionally be a viable temporary solution, it requires the use of another PDF manipulation library, PDF sharp, for which you have to pay to use it for commercial purposes - and to add to the confusion, the price of said library is unknown.

I desperately need to know when you are planning on releasing a patch for this issue, or I will have to consider dropping the PDFSharp library altogether for future projects as well. That would be a real shame since I really do like the simple interface and the fact that, apart from this issue, "it just works".

I am really concerned that this issue was already the "most wanted feature" since 2009 and there has been no movement on it since.

So, I would appreciate a straightforward answer...
1) Are you planning on fixing this issue / developing this feature?
2) If yes when can we expect a patch?

bjlewies wrote Apr 17, 2014 at 9:23 AM

*Sorry, i meant to say __"it requires the use of another PDF manipulation library, ITextSharp".__

Jcoolsen wrote Apr 17, 2014 at 10:50 AM

bjlewies: Well put. I'm in exactly the same situation as you and I have been for some time. I have resigned to use the dated version of iTextSharp, 4.1.6 (https://www.nuget.org/packages/iTextSharp-LGPL/4.1.6). That's the latest one that's still under LGPL. It is more difficult to use this library, but once you get going, have done a few conversions with it, it's not too bad.
For some things, that iTextSharp 4.1.6 cannot do - like text extraction - I use PDFClown (http://www.stefanochizzolini.it/en/projects/clown/). It's not the most well chosen name, but it does what it says on the box.
I hope this helps someone. I'm sorry to say that I feel that PDFSharp is going nowhere fast.

wrote Sep 12, 2014 at 4:46 AM

wrote Jan 22, 2015 at 5:09 PM

dalemac89 wrote Feb 25, 2015 at 11:08 AM

February 2015 and still no fix for this. Guess we'll never get a fix for this.

Mind you, the source code is unchanged since 2012, Doesn't bode well for PDFsharp users :(

wrote Oct 15, 2015 at 12:45 PM

wrote Oct 15, 2015 at 12:45 PM