I am using C# and iTextSharp for PDFs. I have a PDF template that has form fields for information and also form fields for electronic signatures. I need to be able to have staff fill our part of the form, then in code, flatten that part (leaving the signature fields alone) and then I will be passing off the PDF to DocuSign's API to have the user sign the document electronically.
I have requirements that only the fields that should be editable by the user (signature) are form fields when they reach the DocuSign API. I have to flatten all the other fields before passing it to the DocuSign API (DocuSign automatically can Tag form fields for Signature).
Does anyone know how to do this? I have thought about getting the position of the signature fields, and after flattening the whole PDF adding the form fields back in with iTextSharp, but I feel that is a hack.