I would like to submit a reader-enabled pdf form with a digital signature from within a browser.
I'm currently using CoSign Digital Signature to successfully create the signature. I have created a test form with Acrobat X Pro and assigned the "Submit a Form" action to the submit button. The form is configured to submit to a perl cgi, with the Export Format set to FDF with the following settings...
- Field Data
- Incremental changes to the PDF
The post data is received as the POSTDATA parameter and printed back to the browser as content-type: application/vnd.fdf. However, when the fdf is printed back to the browser the digital signature is not included in the signature field. The rest of the form is populated successfully. If I log the POSTDATA value, I can see what appears to be the digital signature.
According to the Adobe docs...
"FDF Exports as an FDF file. You can select one or more of the available options: user-entered data, comments, and incremental changes to the PDF file. The Incremental Changes To The PDF option is useful for exporting a digital signature in a way a server can easily read and reconstruct."
My question is, how do I reconstruct the digital signature so that I can save it offline within the PDF file?
You can't sign a blank document simply by importing an FDF. The data is in the FDF, but the appened saves (aka incremental change) would have to be extracted from the FDF (e.g., using the no longer supported FDF Toolkit) and then concatenated with the original blank form that was used by the person who filled-in and signed. I can't say for sure this will work any more anyway as Acrobat/Reader has changed the way this works and does a Save As (as opposed to Save) when a document is signed, so there is no incremental change data any longer.