I have a web form that uses an HTML5 canvas element to allow users to sign their name. When the form is submitted, all field values and the base64 string (e.g. "data:image/png;base64,blahblahetc") containing the user's signature are processed and stored.
I'd like to fill my pdf template with the submitted data and write the signature to the form but I am struggling with the signature task.
I found one technique while researching that suggests I could write the signature as a pdf button using:
<< /T (button1)/APRef << /N << /F (http://www.yoursite.com/pfds/icons.pdf)/Name (icon3)>> >> >>
However, I can't manage to get this to work. I don't know if the signature must be prepared as .png, .pdf, or something else. (I can successfully generate a .png on the server, but haven't tried to apply it to the .pdf because I don't know if I need it.)
I am using pdftk to fill my template .pdf with the dynamic .fdf file. Do I need to perform any special preparations on the signature button? I think I read something about setting the Layout to "Icon Only."