Bulk printing

// Expert user has replied.
V Vinod Venugopal 10 months 1 week ago
803 5 1

Hi, 

 What are the options to do bulk print using Zebra SDK java library?  Does Zebra SDK support bulk printing?

We would want  to stream the data to the printer using the SDK rather than send each request.  Also, is there any option to cancel the bulk print request? 

Appreciate if you could share any examples.

 

Thanks

Vinod

 

 

Please register or login to post a reply

5 Replies

S Steven Si

What do you mean by "bulk printing"? Do you mean to print multiple copies of the same and identical label? Or do you mean to print labels with different data on each label?

If it's former, there is a ^PQ command in the ZPL to specify how many copies you want for the same label in the ZPL.

For the latter, you can take advantage of the templated based printing, by storing the template on the printer and send the data in ZPL to the printer or stream the data in XML to the printer to print.

For template creation, see the ZebraDesigner for Developers 3.

For XML streaming based template printing, see Zebra XML-Enabled Printer Reference Guide

V Vinod Venugopal

Thanks for your response Steven.

We want to print labels with different data on each label.  At the moment we are storing the template on the printer and sending the data in ZPL to the printer. 

We are using this below method in FormatUtil class passing template location and mappings.

void printStoredFormat(String var1, Map<Integer, String> var2) 

I assume calling this method in a loop for different data on each label - say around 750, would create 750 jobs on the printer queue ?  Instead of that is there any api to send all the labels together so that there is only one print job. 

My another query is any API available for cancelling the print request?  

S Steven Si

The printStoredFormat() only prints one label based on the template at a time. When calling the printStoredFormat() in a loop, the data for each label is cached in the memory buffer on the printer for the printer to print one at a time based on the first come first served. If you want to put all the data together for all the labels in one file, you would have to concatenate the individual ZPL data files into one file and call the sendFileContents() API to send the resulting file once for printing all the labels. The ZPL data file for each individual label needs to comply with the ZPL Recall Format requirement. You will have to do this yourself, as there is no API for that.

No matter whether using printStoredFormat() in a loop or sendFileContents() for multiple labels, the data is stored in the buffer for the labels to be printed, a.k.a., labels or formats in the buffer. These labels or formats in the buffer can be cleared or cancelled all at once with either a ZPL command (~JA) or a SGD command (formats.cancel_all).

V Vinod Venugopal

Thanks for the above response. What is the API to generate the lbl file from the template and data?  I saw this example here which sends .lbl file path to sendFileContents(). 

https://techdocs.zebra.com/link-os/2-14/pc/

S Steven Si

The .LBL file extension is used for the label format files in CPCL formatting language. CPCL is a legacy label formatting language. It is supported currently for backwards compatibility, but no longer evolves. It is recommended to use ZPL label formatting language. There is a tool, ZebraDesigner for Developer 3, to help design and generate the label template files in ZPL, including the Stored Format and the Recall Format. Conventionally, the .ZPL file extension is used for ZPL files.

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