Skip to main content

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.

Add Barcode to PDF Power Automate

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

ParameterTypeDescriptionExample
PDF File content***BinarySource 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***StringDocument 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

ParameterTypeDescriptionExample
Text***StringEncoded 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***OptionIndustry-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***StringTarget 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

ParameterTypeDescriptionExample
Align Horizontal***OptionHorizontal 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***OptionVertical 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***StringHorizontal 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***StringVertical 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

ParameterTypeDescriptionExample
Height in mm***StringBarcode 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***StringBarcode 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***IntegerTransparency 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 View

Response data in a structured table format:

ParameterTypeDescription
File ContentBinaryComplete PDF document with embedded barcode, ready for storage or distribution
File NameStringOutput filename matching input, confirming barcode addition success

Workflow Examples

The PDF4me Add Barcode to PDF action in Power Automate provides comprehensive workflow templates designed for real-world business scenarios:

Automated Invoice Barcode Addition Workflow

Transform your accounts payable with intelligent barcode stamping on invoices for tracking and payment processing:

Complete Workflow Steps:

  1. Trigger: New invoice PDF created in Dynamics 365 or ERP system
  2. Get File: Retrieve invoice PDF from SharePoint document library
  3. Extract Data: Get invoice number and payment reference from invoice record
  4. Add Barcode: Stamp Code128 barcode with invoice number in top-right corner
  5. Update: Save barcode-enhanced invoice back to SharePoint with versioning
  6. Email: Send barcode invoice to accounts payable team via Outlook
  7. Track: Log barcode addition in SQL database for audit trail
  8. 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

Industry Use Cases & Applications

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

Get Help