Read Barcode From PDF in n8n
Read Barcode From PDF is an n8n module by PDF4me that detects and decodes barcodes embedded in a PDF document. Send the PDF as binary data, Base64, or a URL, choose a barcode type and page range, and receive the decoded values as structured JSON.
What this node does
PDF4me: Read Barcode From PDF scans a PDF and decodes any barcodes or QR codes it finds in one n8n step. Choose Barcode Type All or a specific format (QR Code, Code 128, Data Matrix, and other supported types), and target specific pages or the whole document with Pages. Returns the decoded values as a JSON file. Ideal for automated data entry, shipping label processing, inventory tracking, and compliance verification workflows.
Authenticating Your API Request
Every PDF4me node in n8n requires a valid Credential to connect with. Create or select one that holds your PDF4me API key so the workflow can authenticate barcode-reading requests securely.
Important Facts You Should Not Miss

Full node panel: PDF via Binary Data, Barcode Type All, Pages all
Parameters
Required in the n8n UI: Input Data Type, Barcode Type, and Pages. Output File Name (default read_barcode_from_pdf.json), Async, and Binary Data Output Name (default data) are optional convenience fields. Conditional source fields (Input Binary Field, Base64 Document Content, File URL) appear only when their matching Input Data Type is chosen.
| Parameter | Required | What it does | Example |
|---|---|---|---|
| Input Data Type | Required | How the source PDF enters the node. Binary Data reads from a previous node (default, most common). Base64 String accepts an encoded PDF. URL downloads the PDF from a public link. | Binary Data |
| Input Binary Field | Conditional | Name of the binary property on the incoming n8n item that holds the PDF. Required when Input Data Type is Binary Data. | data |
| Base64 Document Content | Conditional | Base64-encoded PDF content. Required when Input Data Type is Base64 String. | UEsDBBQABgAI... |
| File URL | Conditional | Publicly reachable URL to the PDF file. Required when Input Data Type is URL. | https://abc.com/xyz.pdf |
| Output File Name | Optional | Filename of the generated JSON file containing barcode data. Default is read_barcode_from_pdf.json. | read_barcode_from_pdf.json |
| Barcode Type | Required | The barcode format to scan for. All detects any supported type. A specific format speeds up processing when known in advance. | All |
| Pages | Required | Page indices to scan, as a string. Accepts all, a single index like 0, a comma-separated list, or a range like 1-5. | all |
| Async | Optional | Toggle background processing. On processes asynchronously for better throughput on larger jobs, off returns results synchronously. | On |
| Binary Data Output Name | Optional | Name of the binary property the output JSON file is exposed under. Default is data. | data |
What Fields Does the Output Include?
| Field | Type | What it contains |
|---|---|---|
success | Boolean | True when barcode reading completed successfully. Use to route error-handling branches. |
message | String | Descriptive status message confirming success or describing an error. |
fileName | String | Filename of the generated JSON file, set from Output File Name. |
mimeType | String | MIME type of the generated file, application/json. |
fileSize | Number | Size of the generated JSON file in bytes. |
barcodeType | String | The barcode type that was scanned for during this run, for example all or QR Code. |
pages | String | The page range that was scanned during this run. |
Binary (data) | Binary | The JSON file containing decoded barcode values, under Binary Data Output Name (default data). |
How Do I Set Up Read Barcode From PDF in n8n?
- Add PDF4me to your n8n workflow and set Action to Read Barcode From PDF.
- In Credential to connect with, select your PDF4me credential or click Create New Credential and paste your API key.
- Set Input Data Type to Binary Data (default), Base64 String, or URL and fill the matching field.
- Set Barcode Type to All or a specific format such as QR Code or Code 128.
- Set Pages to
all, a single page index, or a range like1-5. - Optionally change Output File Name from the default
read_barcode_from_pdf.jsonand Binary Data Output Name from the defaultdata. - Optionally toggle Async for background processing on larger batches.
- Execute the node and route the decoded JSON output into the next workflow step.
Typical Setups
Workflow ExamplesCommon n8n workflow patterns using Read Barcode From PDF.
- An email attachment trigger receives a shipping manifest PDF (Binary Data, property
data). - PDF4me Read Barcode From PDF runs with Barcode Type Code 128 to decode tracking numbers.
- A Set node parses the JSON output and writes tracking numbers into a logistics spreadsheet.
- A scheduled trigger pulls the weekly inventory report PDF from a URL.
- PDF4me Read Barcode From PDF is configured with Input Data Type URL and Barcode Type All to catch mixed barcode formats.
- The decoded item codes are matched against the inventory database to flag discrepancies.
- A document management system uploads a compliance certificate PDF on approval.
- PDF4me Read Barcode From PDF scans page 1 only (Pages set to 0) for the embedded verification QR code.
- The decoded value is compared against an internal registry to confirm the certificate is genuine.
Practical Tips
Cheat Sheet
| Field | Value |
|---|---|
| Action | Read Barcode From PDF |
| Input Data Type | Binary Data |
| Input Binary Field | data |
| Output File Name | read_barcode_from_pdf.json |
| Barcode Type | All |
| Pages | all |
| Async | On |
| Binary Data Output Name | data |
| Credentials | PDF4me API credential |
Frequently Asked Questions
Related Actions
Same Task on Other Platforms
Use Cases
Document Processing and Data Extraction
- Automatically extract product codes, serial numbers, and tracking information from invoices, shipping documents, and inventory reports to streamline data entry and reduce manual processing errors
- Process scanned documents and digital archives by reading embedded barcodes to identify document types, batch numbers, and reference codes for automated document classification and routing
- Extract customer information and order details from PDF receipts, invoices, and delivery notes by reading QR codes and barcodes that contain encoded customer and transaction data
Quality Control and Compliance Verification
- Verify product authenticity and compliance by reading barcodes from product documentation, certificates, and regulatory forms to ensure products meet industry standards and regulatory requirements
- Process batch tracking and quality control documents by extracting batch numbers, expiration dates, and manufacturing codes from barcodes embedded in production and quality assurance documents
- Validate document integrity and authenticity by reading security barcodes and QR codes that contain verification information and tamper-proof identifiers for document security
Inventory Management and Asset Tracking
- Process inventory reports and asset documentation by reading barcodes to extract item codes, location information, and status updates for automated inventory management and asset tracking systems
- Extract tracking information from shipping labels, delivery documents, and logistics reports to enable real-time package tracking and delivery confirmation for supply chain management
- Process equipment maintenance records and service documentation by reading barcodes that contain equipment IDs, maintenance schedules, and service history for preventive maintenance and asset management