Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Oct 05, 2022 8:43 am

Hi Team,

We are not able to see green tick on digital signature on a pdf.

We are using 5.5.0 version of spire pdf java library. Signature is showing valid but not able to see "Green Tick" on the same. Attached screen shot for reference.

mangapathi.s
 
Posts: 1
Joined: Sat Jul 30, 2022 3:07 pm

Wed Oct 05, 2022 10:29 am

Hello,

Thanks for your inquiry.
Please refer to the attached document to add the Root Certificate on Adobe Trusted Identities.
If it doesn't work, please offer the following information here or send them to [email protected]
1. Your input pdf file.
2. Your certificate .pfx file and its password.
3. Your full code of adding digital signature.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3044
Joined: Wed Jun 27, 2012 8:50 am

Thu Oct 06, 2022 1:41 pm

Hello,

Thanks for more information via email.
To meet your needs, please refer to the following code to sign the pdf file. If you have any other questions, please feel free to write back.
Code: Select all
PdfDocument doc = new PdfDocument();
doc.loadFromFile("input.pdf");
//Create certificate
PdfCertificate cert = new PdfCertificate("NeSL_PvtKey_UAT.pfx", "12345");
//Create signature maker
PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, cert);
PdfSignature signature = signatureMaker.getSignature();
PdfSignatureAppearance appearance = new PdfSignatureAppearance(signature);
appearance.setNameLabel("NameLabel:");
signature.setName("aa");
appearance.setContactInfoLabel("Phone:");
signature.setContactInfo("028-81705109");
appearance.setDateLabel("Date: ");
appearance.setLocationLabel("Address: ");
signature.setLocation("ChengDu");
appearance.setReasonLabel("Cause:");
signature.setReason("I am owner of ducument");
signatureMaker.setAcro6Layers(false);
signatureMaker.makeSignature("signName", doc.getPages().get(0), 40, 700, 120, 120,appearance);
doc.saveToFile("result.pdf", FileFormat.PDF);


Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 757
Joined: Mon Dec 27, 2021 2:23 am

Return to Spire.PDF