-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
is-robustness-issueFrom a users perspective, this is about robustnessFrom a users perspective, this is about robustnessneeds-pdfThe issue needs a PDF file to show the problemThe issue needs a PDF file to show the problemneeds-testA test should be added before this PR is merged.A test should be added before this PR is merged.
Description
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:
Traceback (most recent call last):
File "C:\Python27\lib\lib-tk\Tkinter.py", line 1536, in __call__
return self.func(*args)
File "pdfbind\view.py", line 153, in _on_execute_click
b.bind()
File "pdfbind\bind.py", line 176, in bind
page_bufs.append(page_header.merge(p, header_info))
File "pdfbind\header.py", line 68, in merge
header_page.mergePage(orig_page)
File "PyPDF2\pdf.py", line 2211, in mergePage
self._mergePage(page2)
File "PyPDF2\pdf.py", line 2221, in _mergePage
page2Resources = page2["/Resources"].getObject()
File "PyPDF2\generic.py", line 512, in __getitem__
return dict.__getitem__(self, key).getObject()
KeyError: '/Resources'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
is-robustness-issueFrom a users perspective, this is about robustnessFrom a users perspective, this is about robustnessneeds-pdfThe issue needs a PDF file to show the problemThe issue needs a PDF file to show the problemneeds-testA test should be added before this PR is merged.A test should be added before this PR is merged.