eSign Pdf files with Digital signatures in Java

How to add Digital signature with a few lines of Java code


Download Free Trial

About GroupDocs.Signature for Java Digital signatures API

GroupDocs.Signature for Java is a popular API to esign documents with the digital electronic signatures, with digital certificates. For the Digital signatures API uses PFX certificate files to esign document with password protected private and public keys. The Digital signatures might be used to certify business documents with eSign PDF particular page, certify entire Microsoft Office documents like Words, Excel, Powerpoint files, and Open Office documents. Customers can easily manipulate the signatures like editing them, removing or adjust. The API provides a way to search and verify signatures. Moreover, a lot of abilities for signatures customization are provided.

Steps to sign Pdf with Digital in Java

GroupDocs.Signature for Java provides ability to sign Pdf documents with Digital signatures quickly and easily.

  • Create an instance of Signature class providing Pdf file supposed to signing as path or memory stream
  • Instantiate SignOptions class and set all demanded data.
  • Invoke the Signature.Sign() method passing output Pdf file or memory stream

System Requirements

GroupDocs.Signature for Java are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.

  • Operating systems: Microsoft Windows, Linux, MacOS
  • Development environments: NetBeans, Intellij IDEA, Eclipse, etc.
  • Java runtime: J2SE 6.0 and above
  • Get the latest GroupDocs.Signature for Java from Maven

        
// Set up input Pdf file
String filePath = "input.pdf";
// Set up output file
String outputFilePath = "output.pdf";
// Provide digital certificate
String certificateFilePath = "certificate.pfx";

// Instantiate Signature for input file
Signature signature = new Signature(filePath);

//Provide sign options
DigitalSignOptions options = new DigitalSignOptions(certificateFilePath);

// set certificate password
options.setPassword("1234567890");

// set signature position
options.setLeft(50);
options.setTop(200);

// sign Pdf document
SignResult result = signature.sign(outputFilePath, options);

Signing Pdf documents with Digital Live Demo

Sign Pdf file with various signatures right now by visiting the GroupDocs.Signature App website. Free online demo waiting for you.

No need to download API

No need to write any code

Just upload the source file

Get download link to save the file

Other supported Digital signatures for Java

“You can also sign Pdf with other signature types. Please see the list below.”

Sign DOC with DIGITAL

(Microsoft Word Binary Format)

Sign DOCX with DIGITAL

(Office 2007+ Word Document)

Sign DOCM with DIGITAL

(Microsoft Word 2007 Marco File)

Sign DOT with DIGITAL

(Microsoft Word Template Files)

Sign DOTX with DIGITAL

(Microsoft Word Template File )

Sign ODT with DIGITAL

(OpenDocument Text File Format)

Sign OTT with DIGITAL

(OpenDocument Standard Format)

Sign XLS with DIGITAL

(Microsoft Excel Spreadsheet (Legacy))

Sign XLSX with DIGITAL

(Open XML Workbook)

Sign XLSM with DIGITAL

(Macro-enabled Spreadsheet)

Sign XLSB with DIGITAL

(Excel Binary Workbook)

Sign ODS with DIGITAL

(OpenDocument Spreadsheet)

Sign OTS with DIGITAL

(OpenDocument Spreadsheet Template)

Sign XLTX with DIGITAL

(Excel Template)

Sign XLTM with DIGITAL

(Excel Macro-Enabled Template)

Sign PPTX with DIGITAL

(Open XML presentation Format)

Sign PPTM with DIGITAL

(Macro-enabled Presentation File)

Back to top
 English