PdfReaderExcept ion: Cannot handle iref streams. Open System. Stream stream, System. String path, System.
|Published (Last):||2 March 2010|
|PDF File Size:||14.28 Mb|
|ePub File Size:||9.72 Mb|
|Price:||Free* [*Free Regsitration Required]|
Moderator: Stefan Lange. Users browsing this forum: Google [Bot] and 47 guests. PdfReaderException - "Cannot handle iref streams. Posted: Thu Apr 02, pm.
Hi together, I have a little trouble with the component previously using version 1. By reading various pdf files and merging these I have some files which seem to be created with a newer version of Adobe Acrobat.
Then the component throws an exception of type PdfReaderException with the following message: Quote:. Posted: Thu Jun 04, pm. It will be better if you can either fix this issue or provide some hints to fix it. This problem will get even worse in future. Posted: Mon Aug 03, pm. I came across error this trying to open a PDF made in Acrobat. Any ideas on a time frame for when 1.
Don't really want to have to redo my project with iTextSharp or similar after getting it working so well with PDFSharp. Posted: Tue Aug 04, am. PDFsharp 1. Iref streams are still not implemented. PDF files compatible with Adobe Reader 5. As a workaround: save the files in Adobe Reader 5. Posted: Tue Aug 11, pm. Hi, I am trying to merge the pdf files.
Unfortunately I don't have software to save as lower version pdf. I assume in my situation, I have to wait until pdfsharp supports iref. Just curious is this change complicated, if it is not complicated and if you can give the pointer I will be happy to try it out.
Posted: Thu Sep 24, am. Perhaps you could give us an option to ignore this? I'm not interested in any of the cross-references, and I doubt that most people are. The document would look the same without the cross-references, so just let them go until you can support them, please. As it is, this is totally unusable unless one has the full version of Adobe, because it's impossible to save things back out without it or without going through some elaborate process whereby documents are "printed" to an older version.
I appreciate this tool. I would like to keep using it. If it keeps throwing errors like this, for nothing important that I can see, I'll have to scrap it. Posted: Fri Sep 25, am. It's not about new extra information that can be skipped, it's a new internal file structure. Posted: Mon Sep 28, am. My understanding, then, is that you do not intend to provide any workaround down-versioning pdf's, for example in the event that the structure is incompatible.
Posted: Tue Oct 06, pm. In order to implement it in our product, we need it to open Adobe 6 and later PDF's. Would you have a new release of PDFSharp by then? I understand that you don't know for sure, but any ideas for an estimate of next release? We don't have control over the PDF's we open, so we cannot re-save them. Thanks very much for a nice product. Posted: Wed Nov 04, am.
It is complicated. A "workaround" would be complicated, the real implementation will be complicated. Posted: Mon Nov 23, pm.
Just got this error on a workstation Thank you. Posted: Thu Dec 17, pm. Posted: Tue Feb 23, pm. First of all, let me say that i really love the pdfsharp library.
I use it extensively in my current project, which involves merging pdf files and adding page counters etc. Unfortunately I have no control over the pdf files that are to be merged, so I sometimes got the "iref stream" error message. At the same time I really want to stick with pdfsharp because it is imho a pdf api with a very nice and clear api.
So I developed an ugly workaround which I post here to give back something to this community. Here is the code : Code:. Document reader. SetPdfVersion iTextSharp. SetPageSize reader. AddTemplate page, 0, -1f, 1f, 0, 0, reader. GetPageSizeWithRotation i. Posted: Mon Mar 08, am. Thanks rasepretrep. Not that I like adding a new library just to plug a hole, but that worked a charm.
I used your code on v5 of iTextSharp. Only modifications I made were to open the PdfReader from a byte as my pdfs come from db and then change the writer to write to a MemoryStream. Cheers for the solution. Posted: Wed Apr 07, am. This works, except I lost all of the form fields from the original pdf which is what I really wanted. I am not familiar with either library, does anyone know how to modify the conversion code to convert the form fields as well?
Posted: Wed Apr 28, pm. For those of you who want to use Visual Basic, and want to use MemoryStreams, this is the implementation that I am using which solves a problem we have had for years now Can't tell you how relieved I am! Thanks for the post, "rasepretrep"! It's not ugly! To me, this work around is absolutely beautiful! Imports PdfSharp. Pdf Imports PdfSharp. IO Imports System. AddTemplate page, 0, AddTemplate page, 1. Posted: Wed May 05, am. Thanks atherton01 I like the idea to use a memorystream.
Ill modify my code accordingly. Posted: Wed May 05, pm. Posted: Sun Jul 18, pm. Thanks so much to rasepretrep and atherton01 for posting their workarounds Cheers, Chris. Posted: Thu Aug 19, pm.
I tried the solution of using ITextSharp, and that worked, except the posted code does not successfully handle Forms which come out devoid of form content , only documents. I am now looking into further use of ITextSharp features that may aid me in handling "advanced" forms.
If anyone has information about that, please post it. If I succeed, I will post my results. Posted: Mon Oct 18, pm. I too have customers who are increasingly using PDF's in versions that cause the iref stream error.
I have successfully implemented the iText solution within our development code but would rather not add that library to our production code for various reasons. Posted: Thu Jan 06, pm. Hi, I see the code but is there someone who can tell me how to open the pdf? Posted: Wed Apr 06, am.
Subscribe to RSS
PDFsharp & MigraDoc Foundation
Moderator: Stefan Lange. Users browsing this forum: Google [Bot] and 47 guests. PdfReaderException - "Cannot handle iref streams. Posted: Thu Apr 02, pm. Hi together, I have a little trouble with the component previously using version 1.
Oh no! Some styles failed to load. 😵