views:

396

answers:

3

I'm using GhostScript to merge to PDFs into one PDF. One of the PDFs has textbox fields (editable fields) that I created in Adobe Acrobat Pro 9. When I merge these two PDFs with GhostScript I lose the textbox fields.

Is there any way to merge these files (using GS or some other free linux software) that keeps the textbox fields intact?

A: 

Ghostscript is doing the equivalent of printing, so you will lose the editable fields.

I recommend pdftk. I'm not sure what you mean by "merge" but pdftk can concatenate multiple separate PDF files into a single PDF file, or it can use background/watermark to overlay one page on another.

bmb
@bmb: Ghostscript's *pdfwrite* output device is able to handle PDF hyperlinks just fine -- however, they need to be correctly embedded in the PostScript input file, using the `pdfmark` operator...
pipitas
@pipitas, good to know. However OP was asking about editable fields and my answer is about editable fields.
bmb
@bmb: My comment was regarding your statement *"Ghostscript is doing the equivalent of printing..."* (which is not entirely true, only in part). And I missed to add that **of course** ghostscript can also correctly process editable form fields, again through `pdfmark` operators. -- But of course I agree to your recommendation of `pdftk`; it's the right tool for the job at hand. **;-)**
pipitas
A: 

Maybe you could give the exact commandline you're using to merge the two PDFs?

As for your "some other free linux software" part of your question: did you ever try pdftk (available on Linux and Windows)? It has a quite unusual way of constructing its commandline, but it works very well. See here for details: http://www.accesspdf.com/pdftk/ .

pipitas