Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Zebra ZPL language question

Status
Not open for further replies.

ZiggyS1

Programmer
Oct 6, 2008
97
0
0
CA
I'm just starting to explore this language to see what it can do for me... can anyone tell me this.... does the programming actually map out everything including Barcode? In otherwords, I would not need to use an external program ( like Labelview)?
 
interesting, I put my labelview in diagnostic mode and I can copy the ZPL from the pop up for each label.

I saved it in a text file and printed it to my generic Text Zebra printer and it sort of worked, just the text values appear smeared, so not sure if LV does that on purpose ( Barcodes scanned and layout were exact).

so how would you normally program in ZPL, how do you start...would you use an application that lets you create the layout and then copy the ZPL and replace with variables later? Or do you just right it out and test and modify as you go? I gather you would get used to what to look for after a while?
 
I'm not sure about Labelview, but other windows label software that I have seen eventually create a raster image of the entire label and that is handed to the printer as a block in ZPL format. The printer doesn't concern itself with fonts, drawing lines or what have you, but simply reproduces the image.

If your intent is to draw all of the label elements using ZPL code, then you need a reasonably comprehensive knowkedge of the available ZPL commands. Basically, there are commands to position the "cursor", commands to select and size a font, commands to draw lines, and commands to print text using the selected font. Barcodes are specified in a similar way.

I have done quite a few labels over the years, particularly for use on UNIX systems where there is no printer driver in the mix.

As to how you go about it will depend on what you are after. I ususlly just enter ZPL code with a text editor such as "vi" and really by a process of trial and error enter ZPL commands into a file until I have the label layout needed. I first make the desired label using real data; i.e., no data coming from variables, yet.

Once you have the format and layout figured out, you know what the printer needs to see to reproduce your label. Then you can look at where the real data is stored and how to best get it into a ZPL print file for printing.

Normally, I would put ALL the static items on the label into a macro and printed as an overlay on each label. Now your variable data can then be positioned and imaged independent of the macro doings.

Are you printing a bunch of identical labels to put on product or is the data different on every label. If the info is different on each label, what process is retrieving the data now?

If you haven't done so, get the ZPL manuals from the Zebra website. They contain a number of useful examples.




Jim Asman
 
Thanks Jim,

I did download the manual, and I understand ( like you said) how the various commands control what and where things print. You answered my question as to how you go about doing it, I do have unix but will likely just work in windows environment using something like Access to create the file. But Really I am just experimenting since as i said I have labelview ( it helps me to know this in case I need to deploy something that may not have access to the software (due to licensing). The labels I would print may or may not be all the same, so like you said I would experiment with hard coding and then replace with variables.

thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top