I use PDFsharp (v1.32) for merging several PDF files. I open documents using this code:
PdfDocument inputDocument = PdfReader.Open(pdfFilePath, PdfDocumentOpenMode.Import);
And while opening one document (with PDF version 1.5 (Acrobat 6.x)) I receive an exception:
An unhandled exception of type 'PdfSharp.Pdf.IO.PdfReaderException' occurred in PdfSharp.dll Additional information: Cannot handle iref streams. The current implementation of PDFsharp cannot handle this PDF feature introduced with Acrobat 6.
What can I do with it? I need to merge all files, I cannot just skip it. I tried to find solution, but found not answered or just very old feedback from PDFsharp Team that they are going to "fix it".
Use PDFsharp 1.50 beta 3 from December 2015 or a newer version.
https://www.nuget.org/packages/PdfSharp/1.50.4820-RC1
https://www.nuget.org/packages/PDFsharp-gdi/1.50.4820-RC1
https://www.nuget.org/packages/PDFsharp-wpf/1.50.4820-RC1