Open shanemcquillan opened 9 years ago
I haven't thought about it, because I never understood why it is useful. Can you explain what it is useful for? And the second question is, does PyPDF2 support that functionality? If not, it won't be in stapler.
OK. I checked, the functionality is provided in PyPDF2, so this is maybe possible.
You're correct. I actually found that and created a pull request for an extra function that will set these values across the entire document. Here's the forked version on my repo: https://github.com/mstamy2/PyPDF2 Should be very straight forward for you guys to add.
A feature like this would be useful for filling forms that require similar content regularly.
Agreeded. I too would like to see this functionality.
Others looking and want to take a stab at this: http://pythonhosted.org/PyPDF2/PdfFileWriter.html#PyPDF2.PdfFileWriter.updatePageFormFieldValues
I've got a number of projects relying on pdftk to programmatically fill out user supplied PDF forms with database driven data. It's actually the only reason I use pdftk, and probably the only reason I'd use stapler (if it had the feature).
So +1.
Also, another requirement would be generate_fdf
to create the FDF file from the PDF form file so that it can be passed to the fill_form
command. We perform string replacement within the FDF file to enter mapped field values.
Can you elaborate on that FDF file. Is that a common format? where can I find out more about it?
Yes, FDF is a common format. Until recently it was the only format that could be used to fill forms for PDF documents. More info here, official spec here (starts on page 671).
It's a simple file format, and is primarily used with the following flow:
Hi. I'm wondering if you've given thought to, or considered adding the fill_form functionality of pdftk. I would be interested to know your thoughts on this.