I use PDFSharp to open multiple PDF files to concatenate them to one big, single PDF. This was working for some time now.
"Suddenly" an exception is thrown at PdfReader.Open(file...: Token 284 was not expected
The guy who is creating the PDFs says, he did not change anything
, he just creates the input PDFs from word, like always.
I opened the one failing PDF in notepad++ and saw at the end:
<</Size 116/Root 1 0 R/Info 10 0 R/ID[<AD0C81255325DE47A6D4ED8895969123><AD0C81255325DE47A6D4ED8895969123>] >>
<</Size 116/Root 1 0 R/Info 10 0 R/ID[<AD0C81255325DE47A6D4ED8895969123><AD0C81255325DE47A6D4ED8895969123>] /Prev 29472/XRefStm 29030>>
Since I don't know too much about PDF internals I thought: Hey, why is there a second %%EOF and removed the last "trailer .... %%EOF" part and then I was able to open that PDF with PDFSharp again.
Then I looked at some older, formelry working PDF and saw the same, doubled trailer ... %%EOF parts at the end, so that can not be the problem.
Can somebody help to fix that problem?