empira / PDFsharp-1.5

A .NET library for processing PDF
MIT License
1.28k stars 589 forks source link

pdf fails to open #166

Closed KlaskSkovby closed 1 year ago

KlaskSkovby commented 2 years ago

i have a pdf which fails to open with pdfSharp. the pdf file is 448 KB

i have located it to that the Symbol is an Integer instead of an Xref.

image

then in the ReadXRefStream function it goes into the "Hack"

image

and in the DecodeCrossReferenceStream function it throws the exception Invalid perdictor in array image

How do i fix this?

image

Can this be the issue? https://www.verypdf.com/document/pdf-format-reference/pg_0093.htm For a file that has never been updated, the cross-reference section contains only one subsection, whose object numbering begins at 0

ThomasHoevel commented 1 year ago

No file provided, not repro.