ZPL2PDF is a command-line tool designed to convert Zebra Programming Language (ZPL) labels into PDF files offline. This utility reads ZPL/ZPL II code, renders it in memory, and generates a multi-page PDF where each page represents a label. Built on BinaryKits.Zpl, ZPL2PDF is optimized for automated workflows, bulk processing, and integration with enterprise systems.
Key Features:
Accurate ZPL Rendering: Converts ZPL labels to high-quality images without temporary files.
Batch Conversion: Generates multi-page PDFs from multiple labels in a single file.
Windows CLI: Supports command-line operations for scripting and automation.
Customizable Output: Adjust label dimensions, density, and units (inches, centimeters, millimeters) to match specific requirements.
Audience & Benefit:
Ideal for developers, IT professionals, and warehouse teams requiring offline ZPL-to-PDF conversion. This tool streamlines label processing for automated print pipelines, ERP systems, and bulk operations, saving time and reducing manual steps in workflows.
Install via winget or download the executable from the official repository to integrate ZPL2PDF into your workflow efficiently.
A powerful, cross-platform command-line tool that converts ZPL (Zebra Programming Language) files to high-quality PDF documents. Perfect for label printing workflows, automated document generation, and enterprise label management systems.
🚀 What's New in v3.1.1
🔧 Changed
Release tooling: Scripts under release/scripts/; Linux packaging assets under scripts/release/packages/ (documentation and contributor paths updated).
Internals: Single Labelary PDF fallback path in across CLI, API, TCP server, and daemon; dimension/value-object consolidation and daemon PID handling without reflection.
Output PDF filename (optional; default: input basename or timestamp for -z)
-n result.pdf
-w
Label width
-w 10
-h
Label height
-h 5
-u
Unit (mm, cm, in)
-u cm
-d
Print density (default: 203)
-d 300
--renderer
Rendering engine (offline/labelary/auto)
--renderer labelary
--fonts-dir
Custom fonts directory
--fonts-dir C:\Fonts
--font
Map specific font
--font "A=arial.ttf"
Custom fonts (offline renderer): ZPL font IDs (^A0N, ^AAN, ^ABN, …) are mapped to TTF/OTF files. Use --font "A=arial.ttf" to map font A; use multiple --font for B, 0, etc. If you set --fonts-dir ./fonts, relative paths in --font are resolved under that directory (e.g. --font "A=arial.ttf" → ./fonts/arial.ttf). Example:
ZPL2PDF start [options] # Start daemon in background
ZPL2PDF stop # Stop daemon
ZPL2PDF status # Check daemon status
ZPL2PDF run [options] # Run daemon in foreground (testing)
Option
Description
Default
-l
Folder to monitor
Documents/ZPL2PDF Auto Converter
-w
Fixed width for all conversions
Extract from ZPL
-h
Fixed height for all conversions
Extract from ZPL
-u
Unit of measurement
mm
-d
Print density
203
TCP Server Commands
ZPL2PDF server start [options] # Start TCP server (virtual printer)
ZPL2PDF server stop # Stop TCP server
ZPL2PDF server status # Check TCP server status
Option
Description
Default
--port
TCP port to listen on
9101
-o
Output folder for PDFs
Documents/ZPL2PDF TCP Output
--foreground
Run in foreground (not background)
Background
--renderer
Rendering engine
offline
Language Commands
--language # Temporary language override
--set-language # Set language permanently
--reset-language # Reset to system default
--show-language # Show current configuration
src/
├── Application/ # Use Cases & Services
│ ├── Services/ # Business logic
│ └── Interfaces/ # Service contracts
├── Domain/ # Business entities & rules
│ ├── ValueObjects/ # Value objects
│ └── Services/ # Domain interfaces
├── Infrastructure/ # External concerns
│ ├── FileSystem/ # File operations
│ ├── Rendering/ # PDF generation
│ └── Processing/ # Queue management
├── Presentation/ # CLI & user interface
│ └── Handlers/ # Mode handlers
└── Shared/ # Common utilities
├── Localization/ # Multi-language
└── Constants/ # Configuration
🧪 Testing
Run Tests
# All tests
dotnet test
# Unit tests only
dotnet test tests/ZPL2PDF.Unit/
# Integration tests
dotnet test tests/ZPL2PDF.Integration/
# With coverage
dotnet test --collect:"XPlat Code Coverage"