-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PdfReader.Open will not open a document #216
Comments
Have you tried PDFsharp 6.2.0 Preview 2? |
I have tried loading it on both 6.1.1 and 6.2.0 and it gives the same exception. I ran an older version on my software and was able to load the Pdf, but I'm not sure what version it was running on. I think 6.1.0. I have updated to .NET 8.0 awhile ago so I can't use 6.1.0 |
Have you tried PDFsharp 6.2.0 Preview 2? |
Corrupted PDF file, not yet supported by PDFsharp. |
Thank you for the quick response. I am asking this next question for clarity. Why would it work a with previous versions PDFSharp? The PdfSharp DLLs are dated 11/6/23 |
The consistency check was laxer with 6.0.0 and is stricter with 6.1.0 and newer. |
Duplicate of #186 |
First, thank you for providing such a great tool.
The code I am having an issue with this code:
// RawFileNames[i] is a list of PDF File Names.
int numberOfPages;
using (PdfDocument existingPdf = PdfReader.Open(RawFileNames[i], PdfDocumentOpenMode.Import))
{
numberOfPages = existingPdf.PageCount;
}
The attached file is creating the issue.
JMH roof stairs.pdf
The Unhandled Exception I am getting is:
PdfSharp.Pdf.IO.ObjectNotAvailableException: 'Cannot retrieve stream length.
PDFsharp cannot read this PDF file. If you think your file is a valid PDF file please send it to us so that we can fix this bug in the PDF parser.'
Todd
The text was updated successfully, but these errors were encountered: