diff --git a/PyPDF2/_page.py b/PyPDF2/_page.py index 20d9977f2..08a7b6ca0 100644 --- a/PyPDF2/_page.py +++ b/PyPDF2/_page.py @@ -517,16 +517,17 @@ def _merge_page( page2content = page2.get_contents() if page2content is not None: page2content = ContentStream(page2content, self.pdf) + rect = page2.trimbox page2content.operations.insert( 0, ( map( FloatObject, [ - page2.trimbox.left, - page2.trimbox.bottom, - page2.trimbox.width, - page2.trimbox.height, + rect.left, + rect.bottom, + rect.width, + rect.height, ], ), "re",