Skip to content
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

Merge PDFs with Form Field LOST! #10

Open
mgip opened this issue May 6, 2022 · 1 comment
Open

Merge PDFs with Form Field LOST! #10

mgip opened this issue May 6, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mgip
Copy link

mgip commented May 6, 2022

I try to merge 2 pdf, one of them has a few form field filled allready, but, when i merged in the output file the fields do not show.

@raffaem
Copy link
Owner

raffaem commented May 6, 2022

Hi,

Thanks for the issue.

PDFsak uses latex's pdfpages package for merging, which treats PDFs as images and ignore forms as well as comments (source 1, source 2).

The easiest way for your use cases is probably to use qpdf. To merge a.pdf with b.pdf into c.pdf you can run:

qpdf --empty --pages a.pdf b.pdf -- c.pdf

and forms will be preserved.

In alternative, to use PDFsak we would need to first "flatten" the PDF, that is, convert it into an image, and then merging. This would be achieved with something like:

magick convert -density 300 a.pdf a2.pdf
pdfsak -if a2.pdf -if b.pdf -o c.pdf

we could implement that in PDFsak, however the form will not be editable anymore in the final document.

@raffaem raffaem self-assigned this Aug 31, 2022
@raffaem raffaem added the enhancement New feature or request label Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants