ParserGetBarcodes Method (Int32)
Extracts barcodes from the document page.

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

Parameters

pageIndex
Type: SystemInt32
The zero-based page index.

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 a document page:

C#
// Create an instance of Parser class
using (Parser parser = new Parser(filePath))
{
    // Extract barcodes from the second document page.
    IEnumerable<PageBarcodeArea> barcodes = parser.GetBarcodes(1);

    // 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