GroupDocs.Parser for Java

Read barcodes from ODS using Java

Extract barcode content from PDF, Word, Excel, and image files using GroupDocs.Parser in your Java applications.

How to read barcodes from Ods in Java

With GroupDocs.Parser, Java developers can extract barcodes from ODS documents in just a few steps:

  1. Load the ODS document using Parser.
  2. Verify the document supports barcode extraction.
  3. Use the API to retrieve barcode data.
  4. Loop through the barcode results and apply them as needed.
// Open a document containing barcodes using Parser
try (Parser parser = new Parser("input.ods"))
{
    // Check barcode support for the file
    if (!parser.getFeatures().isBarcodes())
    {
        System.out.println("Handle unsupported file types");
        return;
    }

    // Extract and use barcode data
    Iterable<PageBarcodeArea> barcodes = parser.getBarcodes();
    for(PageBarcodeArea barcode : barcodes)
    {
        System.out.println("Page: " + barcode.getPage().getIndex());
        System.out.println("Value: " + barcode.getValue());
    }
}
<dependencies> <dependency> <groupId>com.groupdocs</groupId> <artifactId>groupdocs-parser</artifactId> <version>24.9</version> </dependency> </dependencies> <repositories> <repository> <id>repository.groupdocs.com</id> <name>GroupDocs Repository</name> <url>https://repository.groupdocs.com/repo/</url> </repository> </repositories>
click to copy
copied
More examples Documentation

More parsing capabilities

GroupDocs.Parser goes beyond barcode extraction—it also lets you extract plain text, images, and structured elements to support data-driven workflows.

Barcode and data extraction features

Wide barcode format support

Detect standard barcode formats including QR Code, Code 39, Data Matrix, EAN, Aztec, and others.

Read barcodes from multiple sources

Extract barcode information from Office documents, PDFs, and image files like PNG, JPG, and BMP.

Custom barcode reading setup

Fine-tune barcode extraction with options for targeting specific regions and multi-page files.

Example: extract barcodes from PDF with options

This sample demonstrates barcode extraction from a PDF document using custom settings.

Java

//  Initialize parser with PDF document
try (Parser parser = new Parser("input.pdf"))
{
    // Ensure the document supports barcode reading
    if (!parser.getFeatures().isBarcodes())
    {
        return;
    }

    // Apply filtering with barcode options
    BarcodeOptions options = new BarcodeOptions(QualityMode.Low, QualityMode.Low, "QR");

    // Extract barcodes using the parser
    Iterable<PageBarcodeArea> barcodes = parser.getBarcodes(options);

    // Handle each barcode result
    for (PageBarcodeArea barcode : barcodes)
    {
        System.out.println("Page: " + String.valueOf(barcode.getPage().getIndex()));
        System.out.println("Value: " + barcode.getValue());
    }
}

Overview of GroupDocs.Parser for Java API

GroupDocs.Parser provides a comprehensive solution for document parsing in Java. It enables developers to extract barcodes, text, images, and structured information from multiple file formats like PDF, Word, Excel, PowerPoint, and others—without needing third-party libraries.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Parser for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

File formats supported for barcode reading

GroupDocs.Parser can read barcodes from many document and image types. Below are some of the commonly supported formats.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English