-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Expected object ID (5 0) does not match actual (4 0); xref table not zero-indexed #672
Comments
|
xref table seems to be present but empty. This is not in agreement with the PDF specification 7.5.4 says "the table shall contain" and as far as I see the document does not contain a "cross-reference stream" as per section 7.5.8. |
I had a second look at this and find that the xref
PyPDF2.PdfFileReader will handle the file if PyPDF2.PdfFileMerger also takes a strict parameter in the constructor and also passes test if |
NO FAULT - PyPDF2 DOES handle this type of badly formed PDF if
|
I just confirmed - thank you @johns1c . I'm closing this as everything seems right. However, I think about adding |
There are two cases producing this error:
First Case
causing
Second Case
causing
Both of them with the PDF file "blah.pdf" created by the scanner of a HP Officejet 8010 printer: blah.pdf
My python version is 3.10.1. I work on Windows 10. The errors happen in a pyCharm Comunity environment.
For a similar error please refer to issue #566 from July 2020 closed yesterday.
The text was updated successfully, but these errors were encountered: