GroupDocs.Signature for Java

Add custom stamps to PDF

Design and apply round or square stamps to any section of your documents using GroupDocs.Signature for Java. Our solution offers extensive customization options to meet all your business needs.

Steps for adding stamps to PDF via Java

GroupDocs.Signature provides a stamp constructor that can be highly beneficial for Java applications. Utilize it to create well-customized stamps for your document pages.

  1. Provide the PDF document to be stamped.
  2. Use StampSignOptions to configure all necessary parameters.
  3. Add as many lines as needed.
  4. Apply the stamp and save the document.
// Use the document path with the Signature object
Signature signature = new Signature("input.pdf");

// Instantiate StampSignOptions with the desired signature text
StampSignOptions options = new StampSignOptions();
options.Height = 180;
options.Width = 180;

// Add one or more stamp lines
StampLine outerLine = new StampLine();
outerLine.setText("* The Best Company *");
outerLine.setTextRepeatType(StampTextRepeatType.FullTextRepeat);
outerLine.getFont().setSize(12);
outerLine.setHeight(22);
outerLine.setTextBottomIntent(6);
outerLine.setTextColor(Color.WHITE);
outerLine.setBackgroundColor(Color.BLUE);
options.getOuterLines().add(outerLine);

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

Protect your document content with signatures

The GroupDocs.Signature for Java library is designed for signing and managing signatures across popular file formats. Effortlessly add, modify, verify, or remove stamps and other types of signatures.

Stamp Signatures with GroupDocs.Signature

Sign your documents

Apply customizable signatures to any part of your document. Choose from various signature types, including text, images, barcodes, QR codes, and stamps. Additionally, hidden metadata can be added or modified to enhance document security.

Search and validate signatures

Once a document is signed, use our verification tools to ensure that the signature content is valid. Search for and retrieve a list of all signatures for further processing.

Update signatures as needed

Easily modify a wide range of signatures applied to a document. Update properties such as size, color, position, content, and more.

Remove signatures

Need to remove signatures from a document? Our API fully supports signature deletion, making it easy to manage your documents effectively.

Add custom stamps to documents using special signatures

Learn how to generate and add custom stamps with important textual information to your documents.

Java

// Provide the document to be stamped
Signature signature = new Signature("input.pdf");

// Instantiate the stamp options object
StampSignOptions options = new StampSignOptions();

// Set the size and position on the page
options.setHeight(200);
options.setWidth(200);
options.setVerticalAlignment(VerticalAlignment.Bottom);
options.setHorizontalAlignment(HorizontalAlignment.Right);
options.setAllPages(true);

// Add one or more outer round lines with text
StampLine outerLine1 = new StampLine();
outerLine1.setText("* The best  choice *");
outerLine1.setTextRepeatType(StampTextRepeatType.FullTextRepeat);
SignatureFont signatureFont1 = new SignatureFont();
signatureFont1.setSize(12);
signatureFont1.setFamilyName("Arial");
outerLine1.setFont(signatureFont1);
outerLine1.setHeight(30);
outerLine1.setTextBottomIntent(6);
outerLine1.setTextColor(Color.WHITE);
outerLine1.setBackgroundColor(Color.BLUE);
options.getOuterLines().add(outerLine1);

// Add one or more inner square lines
StampLine innerLine1 = new StampLine();
innerLine1.setText("Company #1");
innerLine1.setTextColor(Color.RED);
SignatureFont signFont1 = new SignatureFont();
signFont1.setSize(20);
signFont1.setBold(true);
innerLine1.setFont(signFont1);
innerLine1.setHeight(40);
options.getInnerLines().add(innerLine1);

// Save the stamped document
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 robust tool that allows you to add various stamp signatures to documents. It supports over 60 different file formats, including PDFs, Word, Excel, images, and ZIP files. You can apply text, image, barcode, metadata, digital certificate, and stamp signatures. In addition to adding signatures, you can search for, verify, modify, and remove them.
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.

Explore our core features

Utilize a wide range of options for adding, managing, and deleting signatures.

Add stamps across multiple file formats

The GroupDocs.Signature API supports stamping documents in over 60 formats. Place stamps on any page or area to improve document management and customization.

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