Skip to main content

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:

  1. Add PDF4me node to workflow
  2. Select "Read Barcode From PDF" action
  3. Configure input parameters (see below)
Read Barcode From PDF

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.

ParameterTypeDescriptionExample
Input Data Type***StringPDF 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 FieldStringBinary 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 ContentStringBase64 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 URLStringPublic 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***StringBarcode 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***StringBarcode 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***StringPage 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***BooleanAsynchronous 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***StringOutput 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

ParameterTypeDescriptionExample
successBooleanPDF4me 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 workflowstrue
messageStringPDF4me processing status message - Human-readable status message providing details about the barcode reading process result. Includes success confirmation or error details for troubleshootingBarcode data extracted successfully
fileNameStringPDF4me 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 processesread_barcode_from_pdf.json
mimeTypeStringPDF4me 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 systemsapplication/json
fileSizeNumberPDF4me 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 automation525
barcodeTypeStringPDF4me 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
pagesStringPDF4me 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 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"
}

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

Step-by-step guides to rename PDFs using barcode data:

Get Help