PDF.co API icon

PDF.co API

Generate PDF, extract data from PDF, split PDF, merge PDF, convert PDF. Fill PDF forms, add text and images to pdf and much more with pdf.co!

Barcode Reader

AI-generated

Overview

This node reads barcodes from a PDF or image file provided via a URL. It supports multiple barcode types and allows specifying pages to scan and advanced options like optical marks detection and callback URLs. It is useful for automating data extraction from documents containing barcodes, such as invoices, shipping labels, or product packaging.

Use Case Examples

  1. Extract QR codes from a PDF invoice to automate data entry.
  2. Scan multiple barcode types from a shipping label image to track packages.
  3. Detect checkboxes and underlined fields along with barcodes in scanned forms.

Properties

Name Meaning
Authentication Select the authentication method to access the PDF or image file (API Key or OAuth2).
PDF URL The URL of the PDF or image file to read barcodes from.
Barcode Types Select one or more barcode types to detect in the document. Defaults to QR Code.
Pages Comma-separated list of page numbers or ranges to search for barcodes. Leave empty to search all pages.
Advanced Options Additional options such as output file name, optical marks to detect, callback URL, output link expiration, HTTP credentials for source URL, and custom JSON profiles for PDF processing.

Output

JSON

  • barcodes - Array of detected barcodes with their type and value.
  • pagesScanned - Pages that were scanned for barcodes.
  • outputFile - Name or link to the output file if applicable.

Dependencies

  • An API key or OAuth2 credentials for authentication to access the PDF.co service.

Troubleshooting

  • Ensure the PDF URL is accessible and correct; authentication errors may occur if credentials are missing or invalid.
  • Barcode types must be correctly specified; unsupported types will not be detected.
  • If scanning specific pages, ensure page indices are valid and within the document's range.
  • Advanced options like HTTP credentials must be accurate if the source URL requires authentication.
  • Errors related to callback URLs usually mean the webhook is unreachable or misconfigured.

Links

Discussion