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);

原文链接:Add Metadata Signatures to PDF Documents using the Java eSignature API

© 版权声明
THE END
喜欢就支持一下吧
点赞7 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容