GroupDocs.Signature for Java

Sign PDF with digital signatures

Safeguard the content of your business documents by sealing them with digital certificates using the features of GroupDocs.Signature for Java. We provide multiple ways to mark and secure your documents.

Steps for protecting PDF with digital certificates in Java

GroupDocs.Signature allows Java developers to prevent changes in PDF documents using digital signatures. Empower your business applications with the ability to secure important data.

  1. Pass the PDF document to the Signature class constructor.
  2. Use a digital certificate and its password to protect the document.
  3. Optionally, add a visual representation of the digital signature on the document pages.
  4. Sign the document to prevent any future changes.
// Use Signature with the document for digital signing
Signature signature = new Signature("input.pdf");

// Provide a digital certificate and password
DigitalSignOptions options = new DigitalSignOptions("certificate.pfx");
options.setPassword("1234567890");

// Set up visual representation if needed
options.setPageNumber(1);
options.setLeft(100);
options.setTop(100);

// Protect the document with a digital certificate
SignResult result = signature.sign("output.pdf", options);
Maven XML
click to copy
copied
More examples Documentation

Enhance or protect document content with signatures

The GroupDocs.Signature for Java library is capable of signing all popular file formats. Add, modify, verify, or delete various types of signatures automatically to streamline your business processes.

Features of GroupDocs.Signature

Add signatures to documents

Text, Image, Barcode, QR-Code, or Stamp signatures can be precisely added to any page of any supported document. Hidden metadata like EXIF can be added or edited in images and most file types. Protect document content from unauthorized changes using digital signatures.

Signature search and verification

Documents can be processed in various ways after signing. Verify signed documents to ensure they have been processed properly. If you need more control, retrieve a list of all signatures through search.

Edit signatures

Most types of signatures support further modification. You are free to correct text, change position, color, size, and more.

Remove unnecessary signatures

Our solution supports full CRUD operations for signatures. Many types of signatures, including digital certificates, can be deleted from a document when necessary.

Protect documents with digital signatures

Learn how to secure a document from changes using digital signatures.

Java

// Provide a document for signing
Signature signature = new Signature("input.pdf");

// Use a valid digital certificate with a password
DigitalSignOptions options = new DigitalSignOptions("certificate.pfx");
options.setPassword("1234567890");

// Specify additional text data
options.setReason("Security issue");
options.setContact("John Smith");
options.setLocation("Office D.W.");

// Use an image and other options for visual representation
options.setImageFilePath("image.png");

options.setAllPages(true);
options.setVerticalAlignment(VerticalAlignment.Bottom);
options.setHorizontalAlignment(HorizontalAlignment.Right);
options.setWidth(80);
options.setHeight(60);

Padding padding = new Padding();
padding.setBottom(10);
padding.setRight(10);
options.setMargin(padding);

// Save the protected document to a different location
SignResult result = signature.sign("output.pdf", options);
Maven XML
click to copy
copied
More examples Documentation

About GroupDocs.Signature for Java

GroupDocs.Signature for Java is a comprehensive signing solution that supports various types of document processing. You can add text, images, digital certificates, and stamps to files in 60+ formats, including PDF, MS Office, images, ZIP files, and other popular business formats. Additionally, signed documents can be searched, verified, modified, or deleted automatically in a convenient way.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Signature for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Examine our comprehensive feature set

We take pride in the extensive functionality and signature support our platform offers

Sign documents in other formats

The Java API allows you to process more than 60 formats. Create and add various signatures to any page, seal content with digital certificates, and manage and edit existing signatures within the document.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English