Thursday, May 31, 2012

How to digitally sign a pdf file using free software in GNU/Linux

I recently needed to sign a pdf document for legal purposes. The other party was willing to accept a digital signature. That does not mean copying an picture onto a pdf document. It's using public key crypto to sign the pdf document. Acrobat can do it, but I use free software, so, after about 30 minutes I figured out how to do it.

  1. I extracted my csail certificate from my browser. In firefox
    • edit->preferences->advanced->encryption->view certificates
    • select the certificate
    • then hit backup
    • save it as a pkcs12 file
    • you'll be asked for a password for the backup. You'll use this later.
  2. I got jsignpdf-1.3.0 and installed it
    • $ unzip
    • $ cd jsignpdf-1.3.0
  3. I ran it: $ java -jar JSignPdf.jar
    • A simple window popped up with some forms to fill in.
      • keystore type: PKCS12
      • keystore file: choose the backup made of the certificate
      • keystore password: the password you used
      • input file: the pdf file to sign
      • output file: I chose another name to avoid overwriting something useful
      • I clicked the checkbox on "visible signature"
      • Went to the "settings" box next to 'visible signature"
      • I chose the page where the signature needed to be placed, and I chose coordinates. I found the coordinates by running gv input.pdf since ghostview shows the coordinates in the upper left corner. For example, I put my signature on page 7 and put signature at coordinates
        • 147
        • 482
        • 369
        • 519
      • I chose Display: "Signature name and decsription"
      • Hit "close"
    • Then "sign it" on the original jpdfsign window.


Adi said...


Natalia said...

What is the advantage of using a different software to sign a PDF file if Acrobat is having the functionality to perform this task ? Anyways thanks for sharing the way you have used to sign a pdf using this free tool.
digital signature PDF

Tomáš Vrána said...

Actually Adobe Reader has problem signing many PDF files, as it shows "Signing not allowed", while this tool is simple and allows you to sign such PDF quickly...

The Geeks said...

Thanks for review, it was excellent and very informative.
thank you :)

Aeldra Robinson said...

It is very useful to me. Everything is very open and represents very clear explanation of issues. Really blogging is spreading its wings quickly. Your write up is a good example of it.


Dsc Signer said...

Your Blog Is Very Useful And Beautiful As Well.

Software to digitally sign PDF documents

Best Sign PDF Documents Digitally

AdeleB said...

How to digitally sign a pdf file multi-times using free trial of PDF signer software