How to identify PDF document is Certified or not

Hi,
Is there a method available to identify whether the PDF document is Certified or not. We have tried ‘isCertified()’ method but it returns false for all PDFs even though it is Certified.

We have method ‘containsSignature()’ to get the existence of digital signature that is working fine but looks method to identify Certified PDFs not works. Please let us know if any other possible ways available to identify this.

@shanmu45

Would you please share your sample PDF document along with a sample code snippet to test the scenario? We will test it in our environment and address it accordingly.

Hi @asad.ali,
Thanks for your response. Have attached the test document and below is the script we tried.

Certified PDF Document.pdf (283.8 KB)

<<<<<
var pdffile =com.aspose.pdf.facades.PdfFileInfo;
var fileInfo = new pdffile(“F:\TestDocs\Certified PDF Document.pdf”);
var PdfFileSignature = com.aspose.pdf.facades.PdfFileSignature;
var docSignatures = new PdfFileSignature();
docSignatures.bindPdf(fileInfo.getDocument());
if (docSignatures.isCertified()){
throw “Certified PDF document”;
}else{
throw “Not Certified”;
}

@shanmu45

We were able to reproduce the issue in our environment and have logged it as PDFJAVA-39973 in our issue tracking system for the sake of correction. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Thanks @asad.ali

1 Like

The issues you have found earlier (filed as PDFJAVA-39973) have been fixed in Aspose.PDF for Java 23.12.