Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Zebra ZPL language question

Zebra ZPL language question

Zebra ZPL language question

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)?

RE: Zebra ZPL language question

Yes, assuming that you are using a barcode symbology that is supported by ZPL. Certainly, that includes most of the standard ones like Code 128, UPC, 3of9, etc. etc.

Jim Asman

RE: Zebra ZPL language question

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?

RE: Zebra ZPL language question

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

RE: Zebra ZPL language question

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 (http://www.teklynx.com/products/labels/labelview_detail.html)  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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close