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!

Overview

This node reads barcodes from PDF or image files accessible via a URL. It is useful for automating data extraction from scanned documents, invoices, tickets, or any file containing barcodes. For example, it can extract QR codes from a PDF invoice to retrieve payment information or read UPC codes from product labels in images.

Properties

Name Meaning
PDF URL The URL of the PDF or image file to scan for barcodes.
Barcode Types Select one or more barcode types to detect. By default, it looks for QR Codes. Options include many common barcode standards such as Code 128, Data Matrix, EAN-13, PDF417, and more.
Pages Comma-separated list of page numbers to search within the document. Leave empty to scan all pages.
Advanced Options A collection of optional settings:
- File Name: name for the output file.
- Optical Marks Reader: additional marks like Checkbox or UnderlinedField to detect.
- Webhook URL: callback URL to receive results.
- Output Links Expiration: time in minutes before output links expire.
- HTTP Username/Password: credentials if the source URL requires authentication.
- Custom Profiles: JSON string to customize API call options (see external docs).

Output

The node outputs JSON data containing the detected barcodes and their details extracted from the input file. This typically includes the barcode type, decoded value, page number, and position within the page. If configured, it may also provide links to output files or callback responses. Binary data is not directly output but can be referenced via URLs.

Dependencies

  • Requires access to the PDF or image file via a publicly accessible URL or with provided HTTP authentication.
  • Uses an external API service for barcode reading (implied by references to profiles and callbacks).
  • Optional webhook URL can be set up to receive asynchronous results.
  • Custom profiles allow advanced configuration via JSON according to the external API documentation.

Troubleshooting

  • File Access Issues: Ensure the PDF URL is correct and accessible. If authentication is required, provide valid HTTP username and password.
  • No Barcodes Found: Verify that the barcode types selected match those present in the document. Try scanning all pages if specific pages are set.
  • Invalid JSON in Custom Profiles: When using custom profiles, ensure the JSON syntax is correct to avoid API errors.
  • Webhook Failures: Confirm the callback URL is reachable and correctly handles incoming data.
  • Expired Output Links: Adjust the expiration time if output links become invalid too quickly.

Links and References

Discussion