DEV Community

GroupDocs
GroupDocs

Posted on

Add form field esignatures in your .NET based PDF files

GroupDocs.Signature for .NET is a document esigning API for .NET platform supporting a whole host of extremely useful and advanced features across different types of web, desktop and mobile applications. Following code snippet demonstrates how application developers can insert checkbox form field signature in a PDF document on .NET platform.

// instantiate check-box form field signature
FormFieldSignature checkboxSignature = new PdfCheckboxFormFieldSignature("FieldCheckbox", true);
// instantiate options based on check-box form field signature
PdfFormFieldSignOptions checkboxOptions = new PdfFormFieldSignOptions(checkboxSignature)
{
HorizontalAlignment = HorizontalAlignment.Left,
VerticalAlignment = VerticalAlignment.Top,
Margin = new Padding(120, 20, 0, 0),
Height = 10,
Width = 10
};
// sign document
string signedPath = handler.Sign("02_pages.pdf", checkboxOptions,
new SaveOptions { OutputType = OutputType.String, OutputFileName = "Pdf_FormFields" });

Top comments (0)