Merge PDF Files / X on one page? #3556
Replies: 5 comments 5 replies
-
|
The "X" appearing after merging is likely a form field annotation (checkbox) from one of your input PDFs. Flatten or remove annotations before merging: from pypdf import PdfWriter, PdfReader
writer = PdfWriter()
for pdf_file in [fnCover, fnInp]:
reader = PdfReader(pdf_file)
for page in reader.pages:
page.annotations = None # Remove form fields/annotations
writer.add_page(page)
writer.write(fnOut) |
Beta Was this translation helpful? Give feedback.
-
|
I ran your code and got this error: |
Beta Was this translation helpful? Give feedback.
-
|
I also get the error using pypdf - Code: Error: |
Beta Was this translation helpful? Give feedback.
-
|
Same error is happening - also with the new version |
Beta Was this translation helpful? Give feedback.
-
|
Hmmh - i did not see any problem when installing according to the statement you sent - |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello - i try to merge 2 pdfs files using the following code -
And the attached pdf-files -
out.pdf
inp.pdf
cover.pdf
As you can see in the ouput there is on the second page this "X" over the page -

How can i prevent this when merging this 2 pdf-files?
Beta Was this translation helpful? Give feedback.
All reactions