This example shows how to search for Text e-signature in the document.
// The path to the documents directory.
constfilePath=Constants.SAMPLE_SIGNED_MULTI;constfileName=path.basename(filePath);constsignature=newsignatureLib.Signature(filePath);// Setup search options
constoptions=newsignatureLib.TextSearchOptions();options.setAllPages(true);// Search for text signatures in the document
constsignatures=signature.search(signatureLib.TextSignature.class,options).toArray();console.log(`\nSource document ['${fileName}'] contains the following text signature(s).`);// Enumerate all signatures for output
for(consttextSignatureofsignatures){console.log(`Found Text signature at page ${textSignature.getPageNumber()} with type [${textSignature.getSignatureImplementation()}] and text '${textSignature.getText()}'.`);}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples: