ParserGetBarcodes Method
Extracts barcodes from the document.

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

Return Value

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

The following example shows how to extract barcodes from a document:

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

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