Ubuntu – How to digitally sign a PDF with a S/MIME certificate

certificatespdfsignature

I have already acquired a S/MIME certificate (a .p12 file) issued by an authority. Using it in Writer, I can digitally sign documents by following this procedure : How do I make a digital certificate available to LibreOffice Writer for digital signatures?

Can I do the same for PDF files? If yes, what method do you suggest me? I would prefer a solution that relies on Free Software.

Best Answer

Your only option is Portable Signer. Download it and run the jar. It requires a private key in a p12 file though (not compatible with SmartCard).

You might expect Ubuntu document signing tools like qdigidoc or gpg would do, but no, they don't play with PDF signatures.

You might then expect Ubuntu PDF manipulation tools like qpdf, which provides encryption, or pdftk, which provides watermarking, to provide signing features too, but, no, they don't.

The total list of opensource tools available for your purpose is: http://wiki.cacert.org/PdfSigning

Unfortunately, none of the tools is currently maintained and none can be found in Ubuntu packages. Portable Signer is the most well maintained of all.

  • Portable Signer hasn't been updated since 2014 - this is the most well maintained among all.
  • jSignPdf hasn't been updated since 2013.
  • jPdfSign hasn't been updated since 2006.
  • CACert's PdfSigner uses outdated iText tool.
  • OpenSignature hasn't been updated since 2008.
  • Footprint's link is broken.
  • jPDFSecure (commercial) – updated in 2017 but it is a Java library not a user tool.