GroupDocs.Signature for Java

Create text signatures for PDF

Easily add custom text signatures to your business documents using GroupDocs.Signature for Java. Streamline organizational workflows with signature customization options.

Steps for adding text signatures to PDF using Java

GroupDocs.Signature can be integrated into Java applications to add text signatures to PDF documents. Developers can quickly enhance their products’ functionality by using our solutions.

  1. Use the PDF document as a parameter for the Signature class constructor.
  2. Instantiate TextSignOptions with the appropriate text.
  3. Configure the visual options for the signature.
  4. Add the text signature to any page(s) of the document.
// Pass the document path to the Signature constructor
Signature signature = new Signature("input.pdf");

// Instantiate TextSignOptions with the signature text
TextSignOptions options = new TextSignOptions("Approved");

// Set up text color and font attributes
options.setForeColor(Color.RED);
SignatureFont signatureFont = new SignatureFont();
signatureFont.setSize(12);
signatureFont.setFamilyName("Comic Sans MS");
options.setFont(signatureFont);

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

Manage document text signatures

With GroupDocs.Signature for Java, you can streamline your company’s document workflow by adding text signatures to popular file formats. Easily configure the appearance and content of signatures.

Key features of GroupDocs.Signature

Document signatures

Apply text, image, barcode, QR code, or stamp signatures to any page of supported documents. Leverage metadata to embed hidden content and secure your documents with digital certificates.

Signature search and verification

Ensure the integrity of your signed documents with our signature verification tool. You can also retrieve and search all the signatures embedded within a document.

Modify or remove signatures

Modify the content, position, and appearance of previously added signatures, or remove them entirely from the document.

Native text signatures

Add document-specific text signatures, such as stickers in PDFs or watermarks in Word documents, for enhanced customization.

Mark documents with text signatures

Learn how to append textual information to business documents to improve business processes.

Java

// Select a document to be signed
Signature signature = new Signature("input.pdf");

// Create text options with the desired text
TextSignOptions options = new TextSignOptions("Rescheduled to 03/04/2025");

// Specify the signature's size and position on the page
options.setLeft(100);
options.setTop(180);
options.setWidth(230);
options.setHeight(30);

// Signatures support padding from the page corners
Padding padding = new Padding();
padding.setBottom(20);
padding.setRight(20);
options.setMargin(padding);

// Text color and font style can be customized
options.setForeColor(Color.RED);
SignatureFont signatureFont = new SignatureFont();
signatureFont.setSize(12);
signatureFont.setFamilyName("Comic Sans MS");
options.setFont(signatureFont);

// Text signatures can include a border
Border border = new Border();
border.setColor(Color.RED);
border.setDashStyle(DashStyle.Dash);
border.setTransparency(0.5);
border.setVisible(true);
border.setWeight(2);
options.setBorder(border);

// Background customization is also available
Background background = new Background();
background.setColor(Color.YELLOW);
background.setTransparency(0.8);
options.setBackground(background);

// Text can be saved as an image for compatibility
options.setSignatureImplementation(TextSignatureImplementation.Image);

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

About the GroupDocs.Signature for Java solution

GroupDocs.Signature for Java offers flexible and customizable text signatures to simplify your document management tasks. Configure the content and design of text signatures and apply them to any page, enhancing your organization’s document workflow with ease.
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.

Key features and signature options

Our solution supports full CRUD operations and more for seven different types of signatures.

Add text signatures to various file formats

Utilize the Java API to insert textual signatures into Office documents, ensuring complete control over the content at every stage of the document’s lifecycle.

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