tl;dr: I'm looking for a CLI tool that can be fed with a x.509 file and an input PDF and out comes a signed PDF. Best scenario for NodeJS
Hi there. I'm getting a little bit frustrated. I'm looking for a tool which can sign PDF files using the command line. I do use an online service called handy-signatur.at (A service from www.a-trust.at) that generates a x.509 certificate.
I found a page that mentions several tools but it seems that all of them are out of date.
I tried PortableSigner in particular, but that needs Java 6 and I couldn't get it to work on Ubuntu (Server and Desktop edition) 17.04.
/edit: I can't get PortableSigner to work because Java 6 and 7 is no longer available and probably not even safe to use.
Is there any commandline tool out there to sign PDFs?
Thank you guys so much!
Place the image in a document by itself, and convert the document to PDF. Right-click the signature field, and select Sign Document or Certify With Visible Signature.
Just click Fill and sign in the upper right hand corner (or in older versions of Adobe, choose Advanced > Sign & Certify and then select Approval), then click place signature, and place your signature anywhere in the document.
Seems PortableSigner do the work.
If you are worried about Java 7 support. Try it with Java 8, probably the digital signature functions still work because nothing important has changed between 7&8
Alternatively, implementing a signature program with Java using libraries like PDFBox or itext is relatively easy. Here you have a full example with pdfbox. Note that it has a main
https://svn.apache.org/repos/asf/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/CreateSignature.java
usage:
java org.apache.pdfbox.examples.signature.CreateSignature
<pkcs12_keystore> <password> <pdf_to_sign>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With