DEV Community

GroupDocs
GroupDocs

Posted on

2 1

Add Metadata Signatures to PDF Documents using the Java eSignature API

Adding and searching metadata signature functionality for your PDF documents has been introduced as part of the newly released version of GroupDocs.Signature for Java. App developers can programmatically verify encrypted QRCode text, export images as PDF, set e-signature position in Microsoft Excel documents with pixel measurement units; align text in digital signatures for Microsoft Word DOCX, PowerPoint PPTX, PDF documents and Image files within their Java applications - http://bit.ly/2BxcNTd

Below code snippet shows how to add metadata esignature to a PDF file:

// setup options with text of signature
PdfMetadataSignOptions signMetadataOptions = new PdfMetadataSignOptions();
// Specify different Metadata Signatures and add them to options sigature collection
// setup Author property
PdfMetadataSignature mdSign_Author = new PdfMetadataSignature("Author", "Mr.Scherlock Holmes");
signMetadataOptions.getMetadataSignatures().add(mdSign_Author);
// setup data of document id
PdfMetadataSignature mdSign_DocId = new PdfMetadataSignature("DocumentId", java.util.UUID.randomUUID().toString());
signMetadataOptions.getMetadataSignatures().add(mdSign_DocId);
// setup data of sign date
PdfMetadataSignature mdSign_Date = new PdfMetadataSignature("SignDate", new Date(), "pdf");
signMetadataOptions.getMetadataSignatures().add(mdSign_Date);

Following code snippet is for searching metadata esignature feature:

// setup search options
PdfSearchMetadataOptions searchOptions = new PdfSearchMetadataOptions();
// search document
SearchResult result = handler.search("SignedMetadata.pdf", searchOptions);

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs