-
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
Pages without Resources dictionary #270
Comments
Could you possibly share the PDF(s) you're working with so I can take a closer look? PyPDF2 does (or is supposed to) support inheritance of missing page attributes from a parent. |
Here's one of the files causing the problem. Starting with some other page from another document, then calling mergePage() with this PDF results in the above error. |
While PyPDF2 does allow inheriting certain page attributes, It appears that the none of the page's parents contain the Resources dictionary either. It is a required entry, however I'll try to implement a workaround in |
Was this issue resolved? |
p = PyPDF2.PdfReader("c:/108.pdf")
m = PyPDF2.PdfMerger()
m.append(p)
with open("c:/tt.pdf","wb") as f:
m.write(f) issue can be closed |
Thank you for checking @pubpub-zz ❤️ |
Maybe I'm missing something but it looks like this: #1276 only fixes the
|
@FredrikWallstrom Which version of PyPDF2 are you using? |
2.10.8 |
@FredrikWallstrom thanks |
PDF: 108.pdf Stupid code example but the principle is the same:
|
a good example improves analysis.Thanks Should be good now |
Failure using mergePage() with pages that do not have a resource dictionary. This appears to be a valid condition, and the page should then inherit dictionary content from its parent. Trackback below:
The text was updated successfully, but these errors were encountered: