v1.0
This a command line to sign PDF file with a PKCS12 certificate.
You need a private key certificate. I should be a .pfx file.
You need a password for the .pfx
A PDF file to sign.
You can create your own self signed certificate with this following 4 commands in ubuntu. Release includes this certificate with password <12345>.
openssl genrsa -aes128 -out myself.key 2048
openssl req -new -days 365 -key myself.key -out myself.csr
openssl x509 -in myself.csr -out myself.crt -req -signkey myself.key -days 365
openssl pkcs12 -export -out myself.pfx -inkey myself.key -in myself.crt
Then you can sign a PDF file with following command line.
java -jar BatchPDFSign.jar <certificate.pfx> "password" "filetosign.pdf"
For the example included in this release.
java -jar BatchPDFSign.jar myself.pfx "12345" "test.pdf"
That's all folks.