Need ZD420 to cut varied receipt lengths through .NET application

// Expert user has replied.
J Jace Morse 3 years 7 months ago
10 1 0

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.
 
Thanks...

Please Register or Login to post a reply

1 Replies

S Samantha Corn

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.

CONTACT
Can’t find what you’re looking for?