This example shows how to make advanced search for Text signature in the document.
using(Signaturesignature=newSignature(sample.pdf)){// setup search optionsTextSearchOptionssearchOptions=newTextSearchOptions(){// specify special pages to search onAllPages=false,// single page numberPageNumber=1,// setup extended search in pages setupPagesSetup=newPagesSetup(){FirstPage=true,LastPage=true,OddPages=false,EvenPages=false},// specify text match typeMatchType=TextMatchType.Exact,// specify text pattern to searchText="John Smith"}; Β // search documentList<TextSignature>signatures=signature.Search<TextSignature>(searchOptions);// output signaturesforeach(TextSignaturetextSignatureinsignatures){if(textSignature!=null){Console.Write($"Found Text signature: {textSignature.SignatureImplementation} with text {textSignature.Text}.");Console.WriteLine($"Location at {textSignature.Left}-{textSignature.Top}. Size is {textSignature.Width}x{textSignature.Height}.");}}}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in ourΒ GitHub examples: