Home Page PDF digital signature for the Java[TM] Platform
Home
              PDF digital signature
            • Introduction
            • Documentation
            • Download
            • Pricing & Purchase
            • License
            • Documentation

              J4L PDF digital signature component

              Introduction

              The J4L PDF digital signature component can be used to add digital signatures to PDF files. The benefits of the component are:

              • it is very easy to use.
              • the license is non restrictive and can be included in comercial environments.

              Requirements

              The component requires Java 1.5 or later

              Sample application

              The sample application can be run executing the file run.bat. This application will sign the file report.pdf using the test certificate in the certs subdirectory.

              Usage

              The component is very easy to use, it requires only 2 lines of code, for example:


              PDFSignatureFacade facade = new PDFSignatureFacade();
              facade.sign("certs/j4l_test.p12","test","report.pdf","signedreport.pdf");

              This code will sign the report.pdf file using the test certificate in the certs subdirectory.

              There are other methods in the facade that let's you use a java Certificate object and/or streams. Look at the Javadoc subdirectory for a complete list of methods.

              About the signature

              You can add a digital signature to the PDF files you generate. This signature ensures the integrity of your document and its authentication. In other words, the receiver of the document knows you have created that document (authentication) and noone has modified it (integrity). The signature created will use the algorithms RSA signature, SHA1 hash and PKCS7 encoding.

              This section describes how to test the digital signature in the designer and view it in Acrobat reader.

              Once you open the signed PDF file, you will notice Acrobat reader warns you with the text "the signature has problems". The reason for this is, Acrobat does not know the certificate authority (CA) we have used for creating the test certificate. Looking at the signature closely in the signatures panel you will see:

              • The PDF reader says the document has not been modified since the signature has been applied (integrity of the document).
              • The signer's identity is unknown since the reader does not know our test CA.

               

              If you however click on the certificate details link and add the CA certificate as a trusted certificate, you will see the reader now accepts the signature.

               

              You can also make the signature visible somewhere in the page, for example on the left bottom corner. You use the PDFSignatureFacade class for making the signature visible. You can click on the text to see the signature information.

               

              Third party licenses

              This product uses the following libraries: Bouncy Castle library, the Apache PDBox library, the Apache Jempbox library and the Apache Fontbox library.

              The lib subdirectory of the delivery file contains all jar files together with the respective license and notice files.