append visible sign CLI.

91 views
Skip to first unread message

Sebastian Porflit

unread,
Nov 22, 2022, 3:30:38 PM11/22/22
to JSignPdf
Hello again!

I try to figure it out how to append visible sign in CLI on pdf files created with adobe 6.x.

Normally can sign with this:

(PKCS11 + e-token not append sign )

java -jar JSignPdf2.jar -kst PKCS11 -ksp password -ha "SHA256" -V --l2-text "Digitally signed by: "${signer}," signed "${timestamp} -os "_signed" -fs "12.0" -llx 159.1784 -lly 414.9136 -urx 432.1784 -ury 474.9136 --bg-path "C:\\wamp64\\www\\proect\\img\\bgn_sign.png" C:\\test.pdf -cl "NOT_CERTIFIED" -d C:\\signed\\ext\\

and get a signed file but, only with last signer sign.

when I add "-a" I get this:

INFO Choosen configuration requires PDF version update, but it's not possible in the "append" signature mode.

what can I do to achive add second sign, without lost original visible sign, using CLI?

thanks in advance.




Antonis Tsolomitis

unread,
Nov 23, 2022, 1:56:25 AM11/23/22
to jsig...@googlegroups.com, spor...@smartinfo.cl

I do not know if this is proper but since you can not change the pdf version (since the pdf file
is already signed) a solution is to change SHA256 to SHA1 and add the -a flag.

Antonis.
--
You received this message because you are subscribed to the Google Groups "JSignPdf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsignpdf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jsignpdf/c7572a6e-3161-49ad-9a4f-d6e687d2d6afn%40googlegroups.com.

Sebastian Porflit

unread,
Nov 23, 2022, 8:01:22 AM11/23/22
to JSignPdf
thank you!

now I can sign file without error and get 2 signs.

I don't totally integrated with certificates but, how do you can sign just changing hash algorithm?

and again, thanks for you help.

Antonis Tsolomitis

unread,
Nov 23, 2022, 8:26:04 AM11/23/22
to jsig...@googlegroups.com, Sebastian Porflit


I do not know the details. I just know it works 😁

Moreover, because of this problem when you first produce a pdf it is
good to take care so that it is version 1.7
Then multiple signatures will work even with SHA512.

best,

Antonis.

Josef Cacek

unread,
Nov 23, 2022, 8:33:56 AM11/23/22
to jsig...@googlegroups.com
JSignPdf versions before 2.2.0 didn't explain the problem fully in the
error message.

If you switch to the current version it should be more clear. The
change is in this commit:
https://github.com/intoolswetrust/jsignpdf/commit/8b7d5749428e93f79548dfe83b4a0dbe0690f0bd

You can also find list of supported algorithms in different PDF versions here:
https://www.adobe.com/devnet-docs/acrobatetk/tools/DigSigDC/standards.html#message-digest-creation-algorithms

-- Josef

st 23. 11. 2022 v 14:01 odesílatel Sebastian Porflit
<spor...@smartinfo.cl> napsal:
> To view this discussion on the web visit https://groups.google.com/d/msgid/jsignpdf/c57023dd-f7e2-4bae-ac30-71b53f105913n%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
0 new messages