Here are the steps to search Barcode signature within the document with GroupDocs.Signature:
Create new instance ofΒ SignatureΒ class and pass source document path as a constructor parameter.
Use a LINQ query inside theΒ SearchΒ method to define search criteria, such as filtering for text signatures and matching a specific name (“John Smith”) in a case-insensitive manner.
Execute the search by calling theΒ SearchΒ method and passing the query.
Process the found signatures if needed, such as reviewing their properties or performing additional operations.
This example shows how to search Text signature with LINQ query in the document
// Define the path to the documents directory.stringfilePath=Constants.SAMPLE_PDF;stringfileName=Path.GetFileName(filePath);// Create a new Signature instance using the specified file.using(varsignature=newSignature(filePath)){// Perform a search for signatures of type Text that match the specified name.varsignatures=signature.Search(signatureItem=>signatureItem.SignatureType==SignatureType.Text&&(signatureItemasTextSignature)?.Text.Equals("John Smith",StringComparison.OrdinalIgnoreCase)==true);// Optionally, process the found signatures here.}
More resources
GitHub Examples
You may easily run the code above and see the feature in action in ourΒ GitHub examples: