I am following an example in the Document Security 7.1 API Reference to validate a signature, using the code below in a JSP.
DataBuffer pdfFile = dataManager.createFileDataBufferFromUrl(contentUrl);
PDFDocument pdf = pdfFactory.openPDF(pdfFile);
SignatureField[] sigFieldList = pdf.getSignatureFieldList();
SignatureInfoEx sigInfo;
for (int i = 0; i < sigFieldList.length; i++)
{
try
{
sigInfo = sigFieldList[i].getSignatureInfoEx();
if (sigInfo.status == SignatureFieldStatus.VALID_SIGNATURE)
{
out.println("valid");
}
}
catch (NotSigned e)
{
/* This field was not signed */
}
}
When I run the JSP, I get the following error:
An error occurred at line: 16 in the jsp file: /validate.jsp
Generated servlet error:
C:\jboss-3.2.5\server\all\work\jboss.web\localhost\validate\org\apache\jsp\validate_jsp.java:113: cannot resolve symbol
symbol : method getSignatureInfoEx ()
location: interface com.adobe.document.pdf.SignatureField
sigInfo = sigFieldList[i].getSignatureInfoEx();
What could be the cause of the issue?
Thanks,
--Ben