Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Perl Shell
Branch: master
Failed to load latest commit information.
bin added Data::Dump perl dependency
docs ZPL II programming guide
fonts CODABAR ttf font
templates fix line delimiting barcode and callnumber
README added link to video of Windows printer and lpd installation getter usage example leave margin to be setting on printer
print.cgi cleanup pnm files, query printer status
status.cgi display last printer status use librsvg2-bin and netpbm for rendering


Zebra label printer ZPL interpreter and rasterizator

Convert pbm image file to ZPL: print.pnm > print.zpl

Convert ZPL back into pbm image: dump.zpl > dump.pbm

This is my attempt to document various quirks using Zebra printers
attached to Windows machines using USB:

Windows printer driver doesn't seem to support ZPL when shared over CIFS.

There is option to check pass-through, but then you have to wrap ZPL in
start/end markers which cups printer driver doesn't do.

Easier solution is to install port as Generic/Text printer under Windows
and share printer using lpd which is available in Windows XP and newer.

Install "zpl" printer with Generic / Text driver on Windows:

	Start > Printers and Faxes
	Add a printer > Next >
		Local printer attached to this computer >
		Use port: USB001 (Virtual printer port for USB) > Next >
		Generic > Generic / Text Only > Next >
		Printer name: zpl > default printer ? > No > Next >
		Do not share this printer > Next >
		Do you want to print a test page? > No > Next > Finish

Install lpd server on Windows:

	Start > Control Panel
	Add or Remove programs > Add/Remove Windows Components >
	Other Network File and Print Services > Details >
	Print Services for Unix > OK > Next > Finish

	[ Restart Windows to complete install ]

Allow connections from local subnet to port 515:

	Network Connections > Local Area Connection > Properties >
	Advanced - Windows Firewal > Settings >
	Exceptions > File and Printer Sharing > Add Port >
	Name: printer Port Number: 515 > TCP > Change scope >
	Ny network (subnet) only > OK > OK > OK ...

Enable lpd service:

	Control Panel > Administrative Tools > Services >
	TCP/IP Print Server > Startup type: Automatic > Apply >
	Start > OK

Verify that lpd and firewall settings are correct:

	dpavlin@t61p:~$ rlpq -H -P zpl
	rlpq: warning: cannot bind to privileged port: lpd may reject

		Windows XP LPD Server
		Printer \\\zpl

Video of this procedure is available at:

Something went wrong with that request. Please try again.