I am using the tool pdftk
, I have got a editable PDF and I saw in the documentation the arguments dump_data_fields
should show me the fields of the form.
I use this command (windows): pdftk my-pdf-form.pdf dump_data_fields
I am using the pdftk
server edition.
Documentation: https://www.pdflabs.com/docs/pdftk-man-page/
The point is that the PDF is editable, it has got fields to write with Adobe PDF Viewer.
The problem was that the pdf was created by Adobe LiveCycle Designer and was save as "Adobe Dynamic XML From". The solution is saving the file as "Adobe Static PDF Form". Possibly pdftk cannot deal with that livecycle files.
I thought the accepted answer might have been my solution, but it turned out the PDF document I was working with actually didn't have form fields set up. If the document looks like a form, but the form fields are not greyed out, then no fields will be detected.
The only way I could solve this was to open the document in Acrobat Pro and add the fields via its form tool. Then pdftk worked fine.
If you are facing the problem of the OP within the Windows environment, follow the below instructions.
1- Open the GUI PDFtk program. (You may also use the cli if you wish)
2- Click on the "Add PDF..." button and search for your fill-ready PDF file.
3- Scroll down to the bottom of the GUI PDFtk window and click on "Create PDF..." without adding or changing any settings.
4- Save the new fill-ready PDF file with a new name to a directory of your choice
5- Finally, issue the Windows version of the dump_data_fields command using cmd, like so.(notice how "output" is used instead of ">")
6- Open the text file "fields.txt", and you will see the field names. Example shown below.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With