Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants