Months ago, I tested it with positive results on either Mac OSX and/or Ubuntu 14.04 so now I’m gonna test it on the new CentOS7. If it doesn’t work, I’ll either wipe the VPS and install CentOS6 or Ubuntu 16.04. First, I have to remember how I used the templates I created to test it. Ugh.
Watching The Defenders on Netflix, btw. I wanna like Iron Fist so bad. Loved the comics. Iron Fist, that is, not the Defenders. Except for Defenders: Indefensible.
So, testing process is:
- Get form field info using
- Export fdf from a filled-in form using
- Import that fdf data to fill in an empty version of that same form via
I have a PDF form that, filled out, looks like this:
So, first, I need to get the names of the form fields.
pdftk AlbumFormEmpty.pdf dump_data_fields >AlbumForm.txt
That was successful. Yay. Result looks like this:
Now, I’ll export the data from the filled-in form’s content — not normally a part of this process, but it’ll quickly get me the data and other shizzle I need for testing.
pdftk AlbumForm.pdf generate_fdf output AlbumData.fdf
Cool cool cool, that worked fine. It’s hideous, but I have it.
Later, I will/would write a PHP script to create such an fdf file out of data from an html form but for now, I’ll put that fdf back into a PDF form:
pdftk AlbumFormEmpty.pdf fill_form AlbumData.fdf output filled.pdf
One of the places where I learned stuff: