Some test text!
Android / Guides / Verify a document
Try our web demo for digital signature verification.
We offer a higher-level document-based API for verifying signatures, as well as a lower-level per-signature API.
The simple document API has the following possible return values:
For further verification-related information, the detailed API, which returns a VerificationResult and is demonstrated in the full code samples, can be used. For example, it is possible to call GetUnsupportedFeatures on VerificationResult to check which unsupported features were encountered (requires verification using 'detailed' APIs). It is also possible to retrieve a DigitalSignatureField object from the VerificationResult for further non-verification-related information. For example, if you would like to make sure that the document is entirely covered by signatures, or to look at a previous revision, the function GetByteRanges is available on DigitalSignatureField for this purpose.
To verify all cryptographic digital signatures in a document using the simple API:
PDFDoc doc = new PDFDoc(in_docpath); // Choose a security level to use, and change any verification options you wish to change VerificationOptions opts = new VerificationOptions(VerificationOptions.SecurityLevel.e_compatibility_and_archiving); // Add trust root to store of trusted certificates contained in VerificationOptions. opts.addTrustedCertificate(in_public_key_file_path); PDFDoc.SignaturesVerificationStatus result = doc.verifySignedDigitalSignatures(opts);
Full code sample which demonstrates using the digital signature API to digitally sign, certify, and/or verify PDF documents.
Get the answers you need: Support