A commandline application for signing PDF documents

PdfSign is a commandline application written in Java which allows to add an invisible signature to PDF documents. The private key for signing the PDF document have to be stored in an password protected PKCS#12 file. These files usually have the file extension .p12.

Additionally since version 0.2 PKCS#11 compatible hardware-tokens like signature smartcards can be used as private key source. Therefore two additional files are necessary:

  1. A correct configuration file named pkcs11.cfg which resides in the same directory as the pdfsign.jar. Possible parameters of this file are documented in section 2.2 of the Java PKCS#11 Reference Guide. A sample configuration file for Windows which uses the PKCS#11 library from KOBIL can be downloaded here.
  2. A working PKCS#11-library from your token manufacturer is needed. If you are using a PKCS#15 compatible signature smartcard you can try using the PKCS#11 implementation by the OpenSC-Project which includes the libraries opensc-pkcs11.dll for Windows or for Linux.

For processing PDF documents iText - a Free Java-PDF library is used.

The source code for PdfSign bases on this iText example.


PdfSign program

Download jPdfSign.jar (binary without source)

Download jPdfSign source (as Eclipse project)


Download the files jPdfSign.jar and itext-1.4.jar and copy them into the same directory.

Run PdfSign using a PKCS#12 file

java -jar jPdfSign.jar pkcs12FileName pdfInputFileName pdfOutputFileName

Run PdfSign using a PKCS#11 token

java -jar jPdfSign.jar -PKCS11 pdfInputFileName pdfOutputFileName


0.32006-08-22Renaming of the project to jPdfSign - just to delimit it from other available software named "pdfsign".
0.22006-08-14Support added for PKCS#11 compatible tokens and signature smartcards.
0.12006-05-14Initial Release: PDF documents can be signed by using a certificate from an PKCS#12 file.