Pdf Signature Validity Check Mark Not Visible on A

2019-06-14 05:37发布

问题:

I am signing a pdf file with iText. When I view the file on Acrobat Reader 9, the green tick does not appear inside the signature rectangle as it used to do in Acrobat Reader 7.

Note that I can see the validity mark on top of the page, but I specifically want the mark to appear in the signature rectangle.

Some say that this feature is no longer supported by Acrobat by version 9, however I have viewed some digitally signed files with the green check mark on version 9.

So, is there a specific flag or layer on itext I need to use? I already use setAcro6Layers, setVisibleSignature, setLayer2Text, setLayer2Font, setImage, setImageScale etc..

Any help is much appreciated. thanks

回答1:

it turns out I only needed to set Acro6Layers to false and not set any image with setImage method... instead of setImage, I used setSignatureGraphic method...

pdfSignatureAppearance.setAcro6Layers(false);
pdfSignatureAppearance.setImage(null);
pdfSignatureAppearance.setSignatureGraphic(Image...);


回答2:

pdfSignatureAppearance.setAcro6Layers(true);
pdfSignatureAppearance.setImage(null); 

using itext-2.1.7.jar