After testing, I found a bug that came in on beta 3 (1.50.3987). If a document contains a repeating 'endstream' symbol (i.e. endstream endstream endobj, the document will fail to import and throw an exception. In the GitHub source, the relevant code is located in
https://github.com/empira/PDFsharp/blob/master/src/PdfSharp/Pdf.IO/Parser.cs at lines 293 and 296. Version 1.50.3915 does handle this occurrence but as this source is not availiable, I can't specifically point out what changed or why. So in the mean time, I will convert back to the working version until I can properly implement the github source into my code base or an a fix is made.
If I were to make a fix it would be as follows:
Code:
while ((symbol = ScanNextToken()) == Symbol.EndStream);
instead of:
Code:
ReadSymbol(Symbol.EndStream);
symbol = ScanNextToken();
at lines 292-293