Most Powerful Open Source ERP

How To Use ZPL/Zebra to print barcodes in ERP5

How To demonstrating printing barcodes directly from ERP5 using ZPL/Zebra.
  • Last Update:2016-02-09
  • Version:001
  • Language:en

In organisation there is need to print bar code labels on stickers. One possibility is to use sticker printer and send to it PostScript or any other general purpose printing command. But for heavy-duty usage, when count of labels is high, such scenario has disadvantages - in such case printer prints slow, and quality of labels isn't acceptable.

Table of Contents

Speaking Zebra

There is special language - Zebra Programming Language (ZPL) - which is optimised for printing bar code labels. This how-to describes usage of ZPL in ERP5 from user and developer point of view.


Download newest version of ventis_zebra_gpl from the list. Install it and read this how-to. Version list:

  • [get | view] (2007-03-20 15:33:05, 7.8 KB) [[attachment:ventis_zebra_gpl-0.8.0.bt5]]
  • [get | view] (2007-09-20 11:42:45, 8.0 KB) [[attachment:ventis_zebra_gpl-0.8.1.bt5]]

How to create a ZPL template

  • Open Zebra Designer and create a new label
  • Edit your label in any way you want - add text, frames, images and barcodes
  • Print the label to a file - the label will be saved in a text file

The Business Template attached, demonstrates how to use a ZPL script with Page Templates. For more information about ZPL please read 'ZPL II Programming Guide', which is available on-line on Zebra's website.

How to use demo template

  • Install ERP5 (based on erp5_xhtml_view) and erp5_base
  • Install ventis_zebra_gpl
  • Restart Zope
  • Set preferences for Zebra printer and activate them
  • Navigate to portal_skins/ventis_zebra_gpl/ZPLPrintExampleSticker_form
  • Choose number of copies, type some text and print labels
  • They will be send to printer

Technical Information

This BT is connecting to Zebra printer via FTP port and it is sending pure ZPL data. While creating ZPL templates you may set print quality and any other printing properties. Images can also be attached to the template. The template can be put as a Page Template in Zope instance and can be 'TALed'.

This example was tested on Zebra Z4Mplus printer, but should also work on any other ZPL network enabled printer.


This BT was made in Ventis by Łukasz Nowak.


  • make it more generic
  • test it more
  • check for guidelines

Related Articles