40

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

bluish
  • 26,356
  • 27
  • 122
  • 180
Mina Gabriel
  • 23,150
  • 26
  • 96
  • 124
  • I have to do this quite often in my job. What I do is 1. pause the printer. 2. send the printjob. 3. Open the spooler folder. 4. Open the job in Notepad and copy out the ZPL. 5. delete the file from the spool. 6. Unpause the printer. – Joseph Kreifels II Feb 04 '22 at 16:56

4 Answers4

66

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.

Quannt
  • 2,035
  • 2
  • 21
  • 29
  • 4
    Yes this produces the same file output at the accepted answer. – Ian Stanway Aug 27 '13 at 14:39
  • 1
    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 Mar 21 '17 at 12:33
  • 2
    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^LRN^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 – Biswas Khayargoli May 20 '19 at 06:53
  • @Biswas Khayargoli ~~ Yes, I am getting too. So that is the reason why print not working. Have you found any solution? – Aman Attari Jul 14 '20 at 12:17
  • @Biswas Khayargoli ~~ that is not the error it is the part of your ZPL code - you can check your generated code [http://labelary.com/viewer.html] – Aman Attari Jul 14 '20 at 13:28
43

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
Ovi Tisler
  • 6,425
  • 3
  • 38
  • 63
27

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

  • 3
    This is a better answer than the currently accepted answer (adding a file as a port) – gregschlom Feb 07 '17 at 02:22
  • 3
    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 Mar 21 '17 at 12:32
  • 1
    You're my hero @RafaelGomesFrancisco – Walter Cejas Jul 13 '20 at 17:30
8

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.

sergiol
  • 4,122
  • 4
  • 47
  • 81
Hubeyb Özkul
  • 646
  • 7
  • 8