Add Barcode to PDF in Power Automate
PDF4me Add Barcode to PDF action delivers enterprise-grade barcode integration in Power Automate with intelligent placement of QR codes, Code128, DataMatrix, Aztec, Hanxin, and PDF417 barcodes directly onto PDF documents at precise positions with customizable sizing, alignment, and opacity. This comprehensive barcode enhancement service automatically embeds barcodes containing tracking numbers, product codes, URLs, or custom data at specified page locations with millimeter-accurate positioning—transforming automated shipping label generation, invoice barcode stamping, inventory document enhancement, and tracking-enabled PDF creation across Microsoft 365 workflows.
Authenticating Your API Request
To access the PDF4me Web API through Power Automate, every request must include proper authentication credentials. Authentication ensures secure communication and validates your identity as an authorized user, enabling seamless integration between your Power Automate flows and PDF4me's powerful document processing services.

Key Features
- 150+ Barcode Types: Support for QR Code, Code128, DataMatrix, Aztec, Hanxin, PDF417, and 150+ industry-standard formats
- Precision Positioning: Millimeter-accurate placement with horizontal/vertical alignment control
- Custom Sizing: Configure barcode dimensions in millimeters or points for perfect scaling
- Flexible Opacity: Adjust transparency from 0-100% for watermark-style or prominent display
- Multi-Page Support: Add barcodes to specific pages, page ranges, or all pages simultaneously
- Dynamic Data Integration: Embed flow variables, tracking numbers, or database values in barcodes
Parameters
Complete list of parameters for the Add Barcode to PDF action. Configure these parameters to control barcode placement and appearance.
Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.
Document Source Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| PDF File content*** | Binary | Source Document Binary Data • Map PDF file content from previous Power Automate action • Supports dynamic expressions: body('Get_file_content')• Compatible with SharePoint, OneDrive, and email attachments • Enables automated barcode integration into existing documents | body('Get_file_content') |
| PDF File Name*** | String | Document Identifier with Extension • Specify source PDF filename with mandatory .pdf extension • Maintains naming consistency throughout Power Automate flow • Enables document tracking in logs and audit trails • Supports dynamic naming from flow variables | invoice.pdf |
Barcode Content Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| Text*** | String | Encoded Data Content • Supports alphanumeric characters, URLs, tracking numbers, product SKUs • Accepts dynamic content from flow variables and database queries • Character capacity varies by type: QR Code (4,296 chars), Code128 (255 chars) • Enables automated data integration from previous actions | ORDER-12345 |
| Barcode Type*** | Option | Industry-Standard Format Selection (150+ Types) • QR Code - Universal 2D format for mobile scanning and marketing • Code128 - Compact 1D format for logistics and inventory management • DataMatrix - High-density 2D for small labels and industrial use • Aztec - Advanced 2D with superior error correction • Hanxin - Chinese national standard for local compliance • PDF417 - Large-capacity 2D format (up to 2,710 characters) | QR Code |
| Pages*** | String | Target Page Specification • Individual pages: 1,3,5 • Page ranges: 1-10 • All pages: "all" • Enables selective barcode application for multi-page documents | all |
Barcode Positioning Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| Align Horizontal*** | Option | Horizontal Placement Control • Left - Align to left margin (ideal for right-side content) • Center - Horizontal center alignment for symmetry • Right - Align to right margin (standard for headers/labels) | Right |
| Align Vertical*** | Option | Vertical Placement Control • Top - Align to top margin (optimal for headers) • Middle - Vertical center alignment for balance • Bottom - Align to bottom margin (suitable for footers) | Top |
| Margin Horizontal In mm*** | String | Horizontal Spacing Distance (Millimeters) • Defines spacing from alignment edge • Left alignment: spacing from left page edge • Right alignment: spacing from right page edge • Center alignment: parameter ignored • Enables precise positioning and consistent layouts | 20 |
| Margin Vertical In mm*** | String | Vertical Spacing Distance (Millimeters) • Defines spacing from alignment edge • Top alignment: spacing from top page edge • Bottom alignment: spacing from bottom page edge • Middle alignment: parameter ignored • Supports decimal values for sub-millimeter precision | 20 |
Barcode Size & Appearance Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| Height in mm*** | String | Barcode Height Dimension (Millimeters) • Numeric value for explicit height control • Use '0' for automatic height calculation • Minimum 30mm recommended for reliable mobile scanning • Larger dimensions improve scan reliability | 40 |
| Width in mm*** | String | Barcode Width Dimension (Millimeters) • Numeric value for explicit width control • Use '0' for automatic width with proper aspect ratio • Minimum width varies: 30mm (QR Code), 50mm (Code128) • Automatic sizing ensures readability and compliance | 40 |
| Opacity*** | Integer | Transparency Level (0-100) • 0 = Completely transparent (invisible) • 100 = Fully opaque (solid barcode) • 30-50 = Watermark-style semi-transparent • Standard: 100 for scanning, 30-50 for watermarks | 100 |
Output
The PDF4me Add Barcode to PDF action returns comprehensive output data for seamless Power Automate flow integration:
- Table
- JSON
- Flow Integration
Table View
Response data in a structured table format:
| Parameter | Type | Description |
|---|---|---|
| File Content | Binary | Complete PDF document with embedded barcode, ready for storage or distribution |
| File Name | String | Output filename matching input, confirming barcode addition success |
JSON Response Format
The raw JSON response from the action:
{
"File Content": "[Binary PDF Data]",
"File Name": "invoice.pdf"
}
Power Automate Flow Usage
The barcode-enhanced PDF output enables powerful automation across Microsoft ecosystem:
- SharePoint Integration: Save barcode PDFs to document libraries with metadata
- Email Distribution: Attach barcode-enhanced documents to Outlook emails automatically
- OneDrive Storage: Store barcode PDFs in organized folder structures
- Teams Collaboration: Share barcode documents in Teams channels for team access
- Dynamics 365: Link barcode PDFs to CRM records or sales orders
- Azure Storage: Archive barcode documents in Blob Storage for compliance
- Power BI: Track barcode document generation metrics and analytics
Workflow Examples
The PDF4me Add Barcode to PDF action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:
- Automated Invoice Barcoding
- Shipping Label Generation
- Product Catalog QR Codes
- Warehouse Documentation
Automated Invoice Barcode Addition Workflow
Transform your accounts payable with intelligent barcode stamping on invoices for tracking and payment processing:
Complete Workflow Steps:
- Trigger: New invoice PDF created in Dynamics 365 or ERP system
- Get File: Retrieve invoice PDF from SharePoint document library
- Extract Data: Get invoice number and payment reference from invoice record
- Add Barcode: Stamp Code128 barcode with invoice number in top-right corner
- Update: Save barcode-enhanced invoice back to SharePoint with versioning
- Email: Send barcode invoice to accounts payable team via Outlook
- Track: Log barcode addition in SQL database for audit trail
- Archive: Move processed invoice to "Ready for Payment" folder
Business Benefits:
- Automates invoice barcode stamping for 1000+ invoices monthly
- Enables instant invoice lookup with barcode scanning in AP department
- Reduces invoice processing time by 60% with barcode automation
- Maintains complete audit trail of barcode-enhanced documents
Automated Shipping Label Barcode Workflow
Streamline your fulfillment operations with intelligent barcode integration on shipping labels:
Complete Workflow Steps:
- Trigger: New order ready for shipment in Dynamics 365 or order system
- Generate: Create shipping label PDF from order data and customer address
- Get Tracking: Retrieve tracking number from shipping carrier API
- Add Barcode: Embed QR code with tracking number on shipping label
- Position: Place barcode in standard location (top-right, 20mm margins)
- Print: Send barcode label to printer queue or label printing service
- Email: Attach barcode tracking label to customer shipment notification
- Update: Mark order as shipped with barcode label reference
Business Benefits:
- Automates shipping label barcode creation for daily order volumes
- Enables customer self-service tracking with scannable QR codes
- Reduces shipping errors by 75% with automated barcode generation
- Improves delivery tracking accuracy and customer satisfaction
Automated Product Catalog QR Code Enhancement Workflow
Optimize your product documentation with intelligent QR code placement for instant product information access:
Complete Workflow Steps:
- Trigger: Updated product catalog PDF uploaded to SharePoint
- Parse: Extract product IDs and page numbers from catalog metadata
- Generate URLs: Create product detail page URLs for each product
- Add QR Codes: Place unique QR code on each product page linking to product page
- Position: Center QR codes in consistent location on each product page
- Optimize: Compress barcode-enhanced catalog for web distribution
- Publish: Upload enhanced catalog to public SharePoint folder or website
- Notify: Alert marketing team of published catalog with QR codes
Business Benefits:
- Enables instant product information access via mobile scanning
- Increases digital engagement by 85% with scannable catalog QR codes
- Reduces print catalog costs while maintaining physical presence
- Tracks QR code scans for product interest analytics
Automated Warehouse Document Barcode Workflow
Enhance your warehouse operations with intelligent barcode stamping on picking lists and packing slips:
Complete Workflow Steps:
- Trigger: Picking list or packing slip generated from warehouse system
- Get Document: Retrieve PDF from document generation service
- Extract: Get order number, bin locations, and item SKUs
- Add Barcodes: Stamp DataMatrix barcodes for each item on picking list
- Position: Place item barcodes next to item descriptions for easy scanning
- Header Barcode: Add order tracking barcode in document header
- Print: Send barcode document to warehouse printer automatically
- Archive: Store barcode picking list in SharePoint for records
Business Benefits:
- Automates barcode document creation for all warehouse operations
- Enables mobile device scanning for picking accuracy verification
- Reduces picking errors by 80% with scannable item barcodes
- Improves warehouse efficiency and order fulfillment speed
Industry Use Cases & Applications
- E-commerce & Retail
- Logistics & Supply Chain
- Manufacturing & Industrial
- Healthcare & Medical
E-commerce & Retail Use Cases
- Order Tracking: Add tracking barcodes to order confirmations and invoices
- Shipping Labels: Embed carrier barcodes on automated shipping labels
- Product Documentation: Place product QR codes on digital catalogs
- Receipt Enhancement: Add scannable barcodes to digital receipts
Logistics & Supply Chain Use Cases
- Package Tracking: Stamp tracking barcodes on shipping documents
- Packing Slips: Add order barcodes to packing slip PDFs
- Bill of Lading: Embed shipment barcodes on BOL documents
- Warehouse Labels: Generate picking list barcodes automatically
Manufacturing & Industrial Use Cases
- Work Orders: Add job tracking barcodes to work order PDFs
- Quality Documents: Stamp inspection barcodes on QC reports
- Asset Tags: Generate equipment identification barcodes
- Inventory Docs: Add product barcodes to inventory reports
Healthcare & Medical Use Cases
- Patient Records: Add patient ID barcodes to medical documents
- Lab Reports: Stamp specimen barcodes on lab report PDFs
- Prescription Labels: Generate medication tracking barcodes
- Equipment Tracking: Add asset barcodes to equipment logs