Zebra Designer 3 For Developers Receipts malfunction

Tags: 

So, I’m not sure if it’s something I’m doing wrong, but I’m finding that when I print a receipt file created with ZD3fD, either directly to my iMZ320 or to a file, all the elements have their y location coordinate set to 0, stacking everything at the bottom. Additionally, the LL for the header is always set to some really small number. On other observation that might be linked is that in the configuration I’m unable to set the label orientation to 0 degrees, and it is locked at 180. The text elements are all set as inverted, rather than the labels themselves being inverted. Can anyone verify what I’m seeing? Does the pro version do this as well? Anyone have any known good receipt examples in zpl they could share for me to see how things SHOULD work?

Edit: I should mention that the label type documents behave as I expect them to, it’s only the receipt type documents that seem bugged.

Steven Si
Take a look at the Receipt

Take a look at the Receipt.nlbl template that comes with the ZebraDesigner for Developers. It can be found through the Sample Files on the main window of the tool. This sample receipt file gives a sense of how the receipt template works. In general, there is no need to make any manual changes in the output text file(s). The purpose of having ZebraDesigner tool is for people who posess little or no knowledge about ZPL.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Paul Thompson
Hey Steven,

Hey Steven,

I did try the Receipt.nlbl file, and was able to use it to create other receipts from scratch, but all of them display the same issue. As soon as I print them (to disk as a .prn), the y coordinate for all elements is set to 0. I've managed to go into the zpl in the .prn and modify it to get it to sort of cooperate, but it's a tedious process, especially with the receipts automatically set to inverted. I was hoping someone might have straight zpl that I could use as a reference. I'm really thinking that the weird output is a bug with the current version of ZD3fD, but I suppose I could just have installed it wrong or something? Anyway, if someone has Pro and can do a side by side comparison of output for the same receipt file, it would be worth looking at.

EDIT: ok, so I double checked and it was the "PrintConnect Receipt.nlbl" that I was using in my testing, not the "Receipt.nlbl" file from the general folder. When I use the "Receipt.nlbl" file, if I store it and open with Notepad++, the zpl in the file prints out correctly to my iMZ320 when sent through the zebra setup utility's com window. Note, I do have to fix a couple bad characters in the file, specifically where it has the line "~CT~~CD,~CC^~CT~", the first tilde is some weird character. Not sure if that's an encoding issue or what. Anyway, sending that through ZSU works. However, trying to print it directly from ZD3fD, it gets squished, just like the printconnect version was. So something is definitely not happening correctly, but I'm not sure if it's a configuration issue or if the program is bugged, or if it's purely PEBKAC on my part.

Actually, I just tried storing the PrintConnect version too, instead of printing it to the generic driver, and by storing it to local it also produces a correctly formatted printout. So it seems that the loss of y coordinates is occurring when I use the "Test Print" button.

As an aside, I'm not clear on what to do with the template once I have it. Is there a tutorial somewhere on how to make use of it? My specific application is going to be to use the iMZ320 like a POS printer, so I want to send it the receipt programmatically, probably via javascript or python.

To me it LOOKS like I should first send the header, then an item specific instance of the body for each item on the receipt, then follow up with the footer. So each line item would be its own body type label, in effect. Does that sound correct?

EDIT 2: Is there a tutorial somewhere that demonstrates how to store label or receipt forms with their embedded graphics to the printer, and then send just variable values to it to generate the label or receipt?

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Steven Si
Hi Paul,

Hi Paul,

There might be some issues with the Test Print in the tool. I would suggest to select the Generic Printer with the proper resolution (200dpi or 300dpi, etc.) to match with the resolution of the printer you have. The iMZ320 is a 200dpi printer. Once the design of the label or receipt is done, export the template to a file. For receipt, the template has header, body and footer. Each of them is a separate ZPL. The header should be called only once at the beginning, followed by the body for a number of times based on the number of items on the receipt and then followed by the footer at last. Don’t manually edit the output, except copy and paste the header, body & footer sections into separate files, as they are independent ZPL formats. The "~CT~~CD,~CC^~CT~" has its special meaning in formatting (If you want the detail about them, you can refer to the ZPL manual.)

When generating the output, there are three options “Store template to printer”, “Store template to printer then recall” and “Generate print file with variables”. We usually use the 2nd option, i.e. “Store template to printer then recall”. Once the output is generated in a file on the local disk, you can open it in a text editor, e.g. Notepad++. In the output, there are 6 ZPL sections. The first 3 sections are the header, body & footer templates. You can copy them into a separate file and send it once to the printer, so that they will be stored on the printer, either on the flash or in the DRAM, depending on the selections you choose when generating the output.

The last 3 sections are the ZPL “recall formats” to the header, body & footer. They should be used in the application to call out the header, body and footer respectively. There is a recorded tutorial about how to generate the template from ZebraDesigner for Developers - https://www.youtube.com/watch?v=NZq0CvWr6Yc. It’s in the last part of the video. Hope this helps.

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Log in to post comments