A form field is the interactive element located on document page that allows user data input through various control types like free input text box, multi-line text box, check boxes, drop down lists etc. Different document types support specific list of form field types. These elements are used to collect information from user on template form. Each Form Field element has an unique name, settings and value field. Form Fields should have unique names within the form. Picture below demonstrates possible document page with form fields.
How to eSign document with Form Field signature
GroupDocs.Signature for Java supports creation of new form fields or update existing ones within the documents. Class FormFieldSignOptions specifies different options for Form Field signature. The FormFieldSignOptions class contains one FormFieldSignature object to put to the document. Here are the list of different Form Field signature classes that could be set to FormFieldSignOptions
NOTE: At the moment GroupDocs.Signature supports creation of Form Field signatures for PDF documents only.
This example shows how to sign PDF document with Form Field electronic signature on document page.
Signaturesignature=newSignature("sample.pdf");// instantiate text form field signature
FormFieldSignaturetextSignature=newTextFormFieldSignature("FieldText","Value1");// instantiate options based on text form field signature
FormFieldSignOptionsoptions=newFormFieldSignOptions(textSignature);options.setHorizontalAlignment(HorizontalAlignment.Left);options.setVerticalAlignment(VerticalAlignment.Top);options.setMargin(newPadding(10,20,0,0));options.setHeight(10);options.setWidth(100);// sign document to file
signature.sign("signed.pdf",options);
More resources
Advanced Usage Topics
To learn more about document eSign features, please refer to the advanced usage section.
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples:
Along with full-featured .NET library we provide simple, but powerful free Apps. You are welcome to eSign PDF, Word, Excel, PowerPoint documents with free to use online GroupDocs Signature App.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.