Question

pdftk test.pdf test.pdf cat output test2.pdf

I'm trying to use that command to copy the one page PDF and am having little luck. I run that command and the first page of test2.pdf has the form fields but the second one does not.

And even if I did manage to get the second page to have the same form fields as the first page.. I'd like the second pages form fields to be named slightly differently. Like instead of 'name' maybe 'name2' and 'name3' and so on and so forth. Then an FDF would populate each page differently.

Any ideas?

I'm ultimately trying to do this in PHP but do have access to the CLI. pdftk is already installed. I'd prefer not to install anything else for purposes of increased portability however doing so is an option.

Thanks!

Was it helpful?

Solution

I figured this out. I first applied each FDF to test.pdf via this method:

pdftk test.pdf fill_form page1.fdf output page1.pdf flatten dont_ask
pdftk test.pdf fill_form page2.fdf output page2.pdf flatten dont_ask
pdftk page1.pdf page2.pdf cat output final.pdf dont_ask
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top