ZPL Label Cheat Sheet

Quick reference for Zebra print path checks and moving/sizing label elements (203 DPI).

Printer Path

  • Zebra direct - requires Zebra Browser Print service on the client machine
  • Zebra network bridge - sends raw ZPL to host/port through the app server
  • ZPL download - downloads a .zpl file for manual send/queue

Network Bridge Defaults

  • Default raw printer port: 9100
  • Valid port range: 1-65535
  • Empty or invalid port input resets to 9100
  • Default timeout: 5000 ms (UI range 1000-30000 ms)

Connection Test Flow

  • 1. Set printer host (IP or DNS) in Admin -> Label Printing.
  • 2. Keep port at 9100 unless printer config says otherwise.
  • 3. Click Test printer connection.
  • 4. Print labels only after test succeeds.

Movement

  • Increase x -> moves right
  • Decrease x -> moves left
  • Increase y -> moves down
  • Decrease y -> moves up

Text Size

  • Increase h -> taller text
  • Decrease h -> shorter text
  • Increase w -> wider text
  • Decrease w -> narrower text

Barcode

  • Increase moduleWidth -> thicker bars
  • Decrease moduleWidth -> thinner bars
  • Increase barHeight -> taller barcode
  • Decrease barHeight -> shorter barcode

Border

  • border.x / border.y -> move border
  • border.width / border.height -> resize border
  • border.thickness -> line thickness

Dot Scale (203 DPI)

  • 10 dots ~ 0.05 in
  • 20 dots ~ 0.10 in
  • 40 dots ~ 0.20 in
  • 100 dots ~ 0.49 in
  • 203 dots = 1.00 in

Common Connection Errors

  • connect ECONNREFUSED host:9100 -> host reached, but nothing is listening on that port
  • connection timed out -> printer unreachable (IP, VLAN, firewall, DNS)
  • Printer host is required -> host field is empty

Fast Tuning Workflow

  • 1. Pick the closest preset size.
  • 2. Print a test label.
  • 3. Position barcode block first.
  • 4. Position title and price.
  • 5. Fine-tune item/SKU/supplier/footer.
  • 6. Save layout.

Most Common Fixes

  • Text too low -> reduce y
  • Text too high -> increase y
  • Text too far right -> reduce x
  • Text too far left -> increase x
  • Barcode too thick -> reduce moduleWidth
  • Barcode not scanning -> increase barHeight