How to get ZPL code from a ZebraDesigner label?

92,485

Solution 1

You can add a new ZebraDesigner ZPL driver to the system and use a file as the port. Then when you "Print" the document, it will write the ZPL code to the file.

Note that it might have some header information before the first ^XA which you might not need.

UPDATE : (How to add local port on a driver)

  1. Go to Printer Properties
  2. Click on the Ports tab
  3. Click Add Port
  4. Select Local Port and click New port
  5. Enter a filename e.g. C:\output.zpl
  6. Make sure it is checked in the ports list
  7. Now all printing output should go to C:\output.zpl

Solution 2

Not sure if I'm missing something here but from the one that I'm using ZebraDesigner 2.2.3 (Build 4271), I can just click Print, tick "Print to file" checkbox, output to a *.prn file, open that file with Notepad and the code is there.

Solution 3

I use the "Print to file" checkbox in the Print pop-up dialog. It produces a text file with the ZPL inside.

Solution 4

If you want to see native ZPL codes, you must use zebra fonts. If you do not use you will see .GRF codes like below:

^FT320,64^XG007.GRF,1,1^FS

and do not understand them. After that hit print than select "Print to file". So you can see clear ZPL codes.

Share:
92,485
Mina Gabriel
Author by

Mina Gabriel

Programming enthusiast

Updated on March 23, 2021

Comments

  • Mina Gabriel
    Mina Gabriel about 3 years

    I'm using ZebraDesigner 2.2.2 (Build 2728).

    Is there a way to extract the ZPL code from ZebraDesigner? I can't even export it to ZPL file, the only option I have is saving it as .lbl.

    enter image description here

  • xtds
    xtds over 10 years
    is there a way to do the reverse?
  • Ovi Tisler
    Ovi Tisler over 10 years
    You mean go from ZPL to the WYSIWYG label design? No.
  • Ian Stanway
    Ian Stanway over 10 years
    Yes this produces the same file output at the accepted answer.
  • gregschlom
    gregschlom over 7 years
    This is a better answer than the currently accepted answer (adding a file as a port)
  • Rafael Gomes Francisco
    Rafael Gomes Francisco about 7 years
    Only a detail on this answer. Is needed which the correct driver be installed at printer. If you use "Zebra Driver XPTO (EPL)" the printed code will be as EPL code. If you use "Zebra Driver XPTO" (without "(EPL)" on name) you will make a ZPL (Zebra Print Languege) code.
  • Rafael Gomes Francisco
    Rafael Gomes Francisco about 7 years
    Only a detail on this answer. Is needed which the correct driver be installed at printer. If you use "Zebra Driver XPTO (EPL)" the printed code will be as EPL code. If you use "Zebra Driver XPTO" (without "(EPL)" on name) you will make a ZPL (Zebra Print Languege) code.
  • ArgaPK
    ArgaPK over 6 years
    @OviTisler i have a .txt file which contains ZPL code like: ^XA ^FO50,50^A0,60,60^FDTest^FS ^XZ But i am unable to print it's output on Zebra ZTC gc420t (EPL) printer. What should i do?
  • Biswas Khayargoli
    Biswas Khayargoli almost 5 years
    I get some kind of invalid text when I use Print to file : CT~~CD,~CC^~CT~ ==>>> THIS LINE HAS SOME KIND OF CHARACTERS ^XA~TA000~JSN^LT0^MNW^MTD^PON^PMN^LH0,0^JMA^PR4,4~SD15^JUS^L‌​RN^CI0^XZ ^XA ^MMT ^PW1080 ^LL1049 ^LS0 ^FO26,30^GB1034,995,24^FS ^FT77,191^A0N,83,76^FB926,1,0,C^FH\^FDvar_item^FS ^FT83,450^A0N,200,139^FB916,1,0,C^FH\^FDvar_price^FS ^BY6,2,323^FT261,907^BUN,,Y,N ^FDvar_upc^FS ^PQ1,0,1,Y^XZ
  • Walter Cejas
    Walter Cejas almost 4 years
    You can use labelary.com/viewer.html to view and update the ZPL code
  • Walter Cejas
    Walter Cejas almost 4 years
    You're my hero @RafaelGomesFrancisco
  • Aman Attari
    Aman Attari almost 4 years
    @Biswas Khayargoli ~~ Yes, I am getting too. So that is the reason why print not working. Have you found any solution?
  • Aman Attari
    Aman Attari almost 4 years
    @Biswas Khayargoli ~~ that is not the error it is the part of your ZPL code - you can check your generated code [labelary.com/viewer.html]
  • Bill Tudor
    Bill Tudor over 2 years
    @WalterCejas Thanks for your input! I had no idea this was a standardized language
  • Walter Cejas
    Walter Cejas over 2 years
    @BillTudor also we are using it to add images like business logos to the labels