eSign document with multiple signatures

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Signature MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-signature -- dnx GroupDocs.Signature.Mcp --yes
Folders, licensing and more →

GroupDocs.Signature allows to sign document with several signatures simultaneously and even apply signatures of different types to the same document. 
Doing this is as simple as:

This code snippet below demonstrates how to eSign PDF document with multiple signatures at the same time.

Signature signature = new Signature("sample.pdf");
// setup options with text of signature
// define several signature options of different types and settings
TextSignOptions textOptions = new TextSignOptions("This is test message");
textOptions.setVerticalAlignment(VerticalAlignment.Top);
textOptions.setHorizontalAlignment(HorizontalAlignment.Left);

BarcodeSignOptions barcodeOptions = new BarcodeSignOptions("123456");
barcodeOptions.setEncodeType(BarcodeTypes.Code128);
barcodeOptions.setLeft(100);
barcodeOptions.setTop(100);

QrCodeSignOptions qrcodeOptions = new QrCodeSignOptions("JohnSmith");
qrcodeOptions.setEncodeType(QrCodeTypes.QR);
qrcodeOptions.setLeft(100);
qrcodeOptions.setTop(200);

DigitalSignOptions digitalOptions = new DigitalSignOptions("certificate.pfx");
digitalOptions.setImageFilePath("sample.jpg");
digitalOptions.setVerticalAlignment(VerticalAlignment.Center);
digitalOptions.setHorizontalAlignment(HorizontalAlignment.Center);
digitalOptions.setPassword("1234567890");

// define list of signature options
List<SignOptions> listOptions = new ArrayList<SignOptions>();

listOptions.add(textOptions);
listOptions.add(barcodeOptions);
listOptions.add(qrcodeOptions);
listOptions.add(digitalOptions);

// sign document to file
signature.sign("signed.pdf", listOptions);

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:

Free Online App 

Along with full-featured Java 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.