We are making some changes to PDF files programatically using PDFsharp. We are using the latest stable version: 1.32.4334.
http://www.pdfsharp.net/NuGetPackage_PDFsharp-MigraDoc-GDI.ashx?AspxAutoDetectCookieSupport=1
I try to work with pdf files like this;
//inputStream is memory stream
var doc = PdfReader.Open(inputStream);
On some files we get this error when trying to open the PDF like mentioned in the code above;
Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6
I have googled a lot, and see a lot of people have this problem, but I have not really found any good solution. The solutions from the web are:
1.
try
{
}
catch (PdfReaderException pdfException)
{
// Do nothing
}
2. Use beta version 1.50 of PDFsharp.
A third approach could be to use it in combination with iTextSharp, but I have experienced that it gives problem using these two libraries in combination.
My problem is this: The try-catch won't work for us, because we need to manipulate the files, and using a beta version in production environment might not be a good idea - specially when it has been in beta since December 2015.
Is PDFsharp "dead", since they have been in beta with version 1.50 for more than a year?
Any other things I can try?