Need ZD420 to cut varied receipt lengths through .NET application

We have a .NET application that creates a receipt (PDF file) and sends it to the printer. The printer has continuous receipt feed (a roll of thermal paper) and an attached cutter.


The problem, is that the printer is configured (through Zebra Setup Utility) to have a set length for the receipt; however, a receipt can be 4" - 40", depending on items sold.


Is there a way we can dynamically tell the printer to cut, after a varied length receipt has been printed? Any provided examples would be much appreciated, since I've been working with this printer for a whole three days.



Samantha Corn
Hi Jace,If you are asking how

Hi Jace,

If you are asking how to have the label length change with each print, then there unfortunately is no built-in way of resizing the labels. There is a SGD command, zpl.label_length, you could use to set the label length before each print. This command is found on page 938 of the ZPL Programming Guide. This command sets the length of the labels in dots, so you need to convert the length of the PDF to dots. The following equations may be useful:

For 6 dot/mm printheads...    Label length in inches x 152.4 (dots/inch) = y

For 8 dot/mm printheads...    Label length in inches x 203.2 (dots/inch) = y

For 12 dot/mm printheads...  Label length in inches x 304.8 (dots/inch) = y

For 24 dot/mm printheads...  Label length in inches x 609.6 (dots/inch) = y

If you are using the Link-OS SDK, then there is a SGD class using an open printer connection that can be used to send these commands. Documentation for the .NET API can be found here.

Vote up!
Vote down!

Points: 0

You voted ‘up’

Log in to post comments