Signatures Become Invalid When Signed with Tool JsignPDF

39 views
Skip to first unread message

Bảo Vũ Bá

unread,
Sep 14, 2024, 11:46:35 AM9/14/24
to JSignPdf

Hi everyone,

I’m currently facing an issue with digital signatures in PDF files. When I sign the document using CryptoPro tool , everything works fine, and the signature is valid. However, if I use JSingPDF to add another signature to the same PDF, all signatures previously created with CryptoPro become invalid. Has anyone encountered a similar problem or knows what might be causing this conflict between the two tools?


I have attached two files for reference. File A is the original PDF that was signed using Tool  CryptoPro  . File B is the PDF that has been signed with JSignPDF. You’ll notice that all the signatures from file B show as invalid.  

Thanks in advance for any insights you can provide.

B.pdf
A.pdf

Josef Cacek

unread,
Sep 14, 2024, 11:50:04 AM9/14/24
to jsig...@googlegroups.com
Have you used the Append signature option? (-a / --append command line
option in the batch mode or a checkbox in GUI when "Advanced view" is
used)
jc

so 14. 9. 2024 v 17:46 odesílatel Bảo Vũ Bá <vbba...@gmail.com> napsal:
> --
> 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/72a71666-5590-4f0c-8c04-20d213922a7cn%40googlegroups.com.

Bảo Vũ Bá

unread,
Sep 14, 2024, 11:59:10 AM9/14/24
to jsig...@googlegroups.com
  Yes, I used it. Here is the command that I used.

java -jar "C:\Program Files\JSignPdf\JSignPdf.jar" "C:\Users\Baovb\Desktop\SignTest\Có chữ ký Crypto.pdf" -a --out-directory "C:\Users\Baovb\Desktop\SignTest" -os "s" -ksf C:\Users\Baovb\Desktop\SignTest\AMy.p12 -ksp "43299A" -kst JKS -llx 392 -lly 73 -urx 492 -ury 573 --visible-signature --bg-path "D:\Download\KhanhHong.png" --l2-text 'X'  

Vào Th 7, 14 thg 9, 2024 vào lúc 22:50 Josef Cacek <josef...@gmail.com> đã viết:
You received this message because you are subscribed to a topic in the Google Groups "JSignPdf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsignpdf/2EMBw-O5a58/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsignpdf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jsignpdf/CA%2B6Tb2qyTfDSAX7j33eh482NHN39diEG7hmVoBySmYux%3DAMbLg%40mail.gmail.com.

Bảo Vũ Bá

unread,
Sep 14, 2024, 12:11:46 PM9/14/24
to jsig...@googlegroups.com
  I tried analyzing the file with Ghostscript, and it reported that the file does not conform to the structure. I’m wondering if OpenPDF alters the structure or removes something from the PDF file.  
--------------------------------------------------------------------------------------------------------------------------------
C:\Users\Baovb>gswin64c -o nul -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -dNEWPDF=false "C:\Users\Baovb\Desktop\SignTest\B.pdf"

The old, written in PostScript, PDF interpreter has been removed entirely.
You should cease using -dNEWDPF as it has no effect now.
Continuing to process PDF file using the new, written in C, PDF interpreter.
Processing pages 1 through 4.
Page 1
Loading font Arial-BoldMT (or substitute) from %rom%Resource/Font/NimbusSans-Bold
Loading font ArialMT (or substitute) from %rom%Resource/Font/NimbusSans-Regular
Page 2
Page 3
Page 4

The following warnings were encountered at least once while processing this file:
        The generation number of an indirectly referenced object did not match the xref

   **** This file had errors that were repaired or ignored.
   **** The file was produced by:
   **** >>>> JSignPdf 1.6.1 based on iText 2.1.7 <<<<
   **** Please notify the author of the software that produced this
   **** file that it does not conform to Adobe's published PDF
   **** specification.

Vào Th 7, 14 thg 9, 2024 vào lúc 22:58 Bảo Vũ Bá <vbba...@gmail.com> đã viết:

Bảo Vũ Bá

unread,
Sep 15, 2024, 11:07:51 PM9/15/24
to jsig...@googlegroups.com

Hi Josef,

I hope you're doing well. Could you please take a moment to review an issue I'm facing? My project urgently requires the use of JSignPDF, and I'm encountering some challenges. 

Your help would be greatly appreciated.


Vào Th 7, 14 thg 9, 2024 vào lúc 22:50 Josef Cacek <josef...@gmail.com> đã viết:
Have you used the Append signature option? (-a / --append command line
You received this message because you are subscribed to a topic in the Google Groups "JSignPdf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jsignpdf/2EMBw-O5a58/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jsignpdf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jsignpdf/CA%2B6Tb2qyTfDSAX7j33eh482NHN39diEG7hmVoBySmYux%3DAMbLg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages