We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Verify if pdf (not pdf/a) is signed

I’d like to verify if a pdf file (not pdf/a) has been signed.
I use the following code, but it doesn’t work:

PdfFileSignature pdfFileSignature = new PdfFileSignature();
try {
	pdfFileSignature.bindPdf(new ByteArrayInputStream(contenuto));
	retvalue = pdfFileSignature.containsSignature();
} catch (Exception ex) {
} finally {

retvalue is valorized to false even if my pdf file is signed.

It seems it works only on pdf/a signed files


Thank you for contacting support.

Would you please share a sample PDF document where it works and where it does not. So that we may try to reproduce and investigate further accordingly. Before sharing requested data, please ensure using Aspose.PDF for Java 19.11.

Thanks Farhan…at the end i’ve used another library to check the signature: pdfbox and it works.


Thank you for your kind feedback.

We are unable to notice the problem with PDF docuemnts in general, thus requested you for sample files. Aspose.PDF for Java API also offers this feature. Please feel free to contact us if you need any further assistance.