ParserGetBarcodes Method (PageAreaOptions)
Extracts barcodes from the document using customization options (to set the rectangular area that contains barcodes).

Namespace: GroupDocs.Parser
Assembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 22.06.0
Syntax
public IEnumerable<PageBarcodeArea> GetBarcodes(
	PageAreaOptions options
)

Parameters

options
Type: GroupDocs.Parser.OptionsPageAreaOptions
The options for barcodes extraction.

Return Value

Type: IEnumerablePageBarcodeArea
A collection of PageBarcodeArea objects; null if barcodes extraction isn't supported.
Examples

The following example shows how to extract barcodes from the upper-right corner.

C#
// Create an instance of Parser class
using (Parser parser = new Parser(filePath))
{
    // Create the options which are used for barcodes extraction
    PageAreaOptions options = new PageAreaOptions(new Rectangle(new Point(590, 80), new Size(150, 150)));
    // Extract barcodes from the upper-right corner.
    IEnumerable<PageBarcodeArea> barcodes = parser.GetBarcodes(options);

    // Iterate over barcodes
    foreach (PageBarcodeArea barcode in barcodes)
    {
        // Print the page index
        Console.WriteLine("Page: " + barcode.Page.Index.ToString());
        // Print the barcode value
        Console.WriteLine("Value: " + barcode.Value);
    }
}
See Also