Read Barcode From PDF using n8n action
PDF4me Read Barcode From PDF extracts and decodes barcodes from PDF documents through n8n automation workflows. Process PDFs via n8n triggers, binary data, base64 strings, or public URLs to automatically detect and read 100+ barcode types (QR Code, Code 128, Data Matrix, EAN-13, PDF417, etc.) with support for multiple barcodes per page, specific page targeting, and structured JSON output. This solution is ideal for automated data entry, inventory management, document processing, shipping workflows, compliance tracking, and asset management that require accurate barcode recognition and reliable data extraction.
Setup
Add the PDF4me "Read Barcode From PDF" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.
Prerequisites:
- PDF4me API credentials
- n8n workflow access
Configuration:
- Add PDF4me node to workflow
- Select "Read Barcode From PDF" action
- Configure input parameters (see below)

Parameters
Complete list of parameters for the Read Barcode From PDF action. Configure these parameters to control barcode extraction.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
| Parameter | Type | Description | Example |
|---|---|---|---|
| Input Data Type*** | String | PDF Input Format Selection • Choose the format of your input data (PDF document) • PDF4me supports multiple input types for barcode reading • Options: Binary Data, Base64 String, or URL | Binary Data |
| Input Binary Field | String | Binary Input Field (Required if Binary Data) • Reference the input PDF file field from previous n8n node • PDF4me processes binary files with automatic barcode recognition • Required when Input Data Type is "Binary Data" | data |
| Base64 Document Content | String | Base64 Encoded Input (Required if Base64 String) • Provide input PDF data as a base64 encoded string • PDF4me automatically decodes and processes for barcode extraction • Required when Input Data Type is "Base64 String" | UEsDBBQABgAI... |
| File URL | String | Public Input URL (Required if URL) • Provide a public/open permission URL to the input PDF file • PDF4me downloads and processes the file from URL • Required when Input Data Type is "URL" | https://abc.com/xyz.pdf |
| Output File Name*** | String | Barcode Data Output Filename • Specify the name for the generated JSON file with extracted barcode data • Must include .json extension • PDF4me ensures unique naming and format validation | read_barcode_from_pdf.json |
| Barcode Type*** | String | Barcode Type Selection • Choose the specific barcode type to read from the PDF • Supports all barcode types or specific formats for optimized processing • Options: All, QR Code, Code 128, Data Matrix, etc. | All |
| Pages*** | String | Page Range Selection • Specify page indices as comma-separated values or ranges • Examples: "all" (all pages), "0" (first page), "0, 1, 2" (specific), "1-5" (range) • If not specified, processes all pages • Must be in string format | all |
| Async*** | Boolean | Asynchronous Processing • Enable asynchronous processing for barcode reading operations • true = background processing for better performance • false = synchronous processing with immediate results • Ideal for high-volume operations | true |
| Binary Data Output Name*** | String | Output Binary Field Name • Specify the name for the binary data field with JSON output • Contains extracted barcode data for subsequent workflow steps • Essential for workflow data flow management | data |
Output
Output Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| success | Boolean | PDF4me barcode reading status indicator - Boolean flag indicating the success or failure of the barcode reading process. PDF4me returns true for successful reading and false for any errors, enabling robust error handling in automated workflows | true |
| message | String | PDF4me processing status message - Human-readable status message providing details about the barcode reading process result. Includes success confirmation or error details for troubleshooting | Barcode data extracted successfully |
| fileName | String | PDF4me barcode data filename - The complete filename of the successfully generated JSON file containing extracted barcode data with proper .json extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processes | read_barcode_from_pdf.json |
| mimeType | String | PDF4me JSON data MIME type - The MIME type of the generated JSON file containing barcode data, indicating the file format for proper handling in web applications and file systems | application/json |
| fileSize | Number | PDF4me JSON file size in bytes - The exact size of the generated JSON file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise document management and workflow automation | 525 |
| barcodeType | String | PDF4me barcode type processed - The barcode type that was processed during the reading operation. Indicates which barcode format was scanned (e.g., "all", "QR Code", "Code 128") | all |
| pages | String | PDF4me pages processed - The page range that was processed during the barcode reading operation. Indicates which pages were scanned (e.g., "all", "1", "1-5") | all |
N8N Action Response
The PDF4me Read Barcode From PDF API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:
- JSON
- Table
- Schema
- Binary
JSON Response Format
The raw JSON response from the API:
{
"success": true,
"message": "Barcode data extracted successfully",
"fileName": "read_barcode_from_pdf.json",
"mimeType": "application/json",
"fileSize": 525,
"barcodeType": "all",
"pages": "all"
}
Table View
Response data in a structured table format:
| Parameter | Value |
|---|---|
| success | true |
| message | Barcode data extracted successfully |
| fileName | read_barcode_from_pdf.json |
| mimeType | application/json |
| fileSize | 525 |
| barcodeType | all |
| pages | all |
Schema View
The data structure and types of the response:
1 item
success: ☑ true
message: AB Barcode data extracted successfully
fileName: AB read_barcode_from_pdf.json
mimeType: AB application/json
fileSize: # 525
barcodeType: AB all
pages: AB all
Type Indicators:
AB= String#= Number☑= Boolean[]= Array
Binary Data View
The actual JSON file data and metadata:
data
─────────────────────────────
File Name: read_barcode_from_pdf.json
File Extension: json
Mime Type: application/json
File Size: 2.0 KB
Binary Data Access:
- n8n Binary Object:
$binary.data.data - Base64 Content: Available for direct use
- File Operations: Ready for download, email, or storage
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
Related Blogs
Step-by-step guides to rename PDFs using barcode data: