pypdf icon indicating copy to clipboard operation
pypdf copied to clipboard

PDF created by merging multiple PDFs shows blank form fields when opened in Adobe Acrobat

Open jamoham opened this issue 7 years ago • 1 comments

When I create a PDF by merging multiple PDFs then only the first page shows up correctly but all subsequent pages show blank form fields. This happens only when this file is viewed on Adobe Acrobat.

Code + PDF

Please refer the attachment and compare Page1 and Page2 of the PDF: document-output.pdf

from PyPDF2 import PdfMerger

merger = PdfMerger()
merger.append("working_us_report.pdf")
merger.append("working_us_report-2.pdf")

merger.write("document-output.pdf")

jamoham avatar Nov 08 '16 00:11 jamoham

Can you please share the two original files? (I notice that it's been 6 years - it doesn't have to be the same, but two files that show the issue)

MartinThoma avatar Apr 22 '22 15:04 MartinThoma

I'm having the same problem. I like the "pypdf" wonderfully, but I think it will be even better once this issue is resolved.

input file:

1.pdf 2.pdf

output file:

PyPDF2_out.pdf

code

import PyPDF2

merger = PyPDF2.PdfFileMerger()

merger.append('1.pdf')
merger.append('2.pdf')

merger.write('PyPDF2_out.pdf')
merger.close()

taka1426 avatar Dec 29 '22 06:12 taka1426

@taka1426 can your confirm this issue still exists with the latest pypdf version (pip install 'pypdf>=3.2.1')

pubpub-zz avatar Jan 09 '23 21:01 pubpub-zz

@taka1426, this should be #fixed with #1553 (should be released this week-end). Can you retry it then? (do not forget to use add_form_topname() )

pubpub-zz avatar Feb 05 '23 09:02 pubpub-zz

Without news I close this issue as solved

pubpub-zz avatar Feb 12 '23 22:02 pubpub-zz