Question

I can't really find anything on how to print through EPL with Visual Basic. Can anyone help me write some simple text to the printer? I found the Zebra EPL manual so I think I can go from there, I just don't know how to get it started.

Was it helpful?

Solution

The way I do it is using the FSO to do a filecopy from of the label text file to the UNC path of the printer. (i.e. FSO.copyfile filepath, UNCpath).

Create a string with the EPL raw file (text) in it. Save it to a temp file then do the copyfile I mentioned above.

What I have found is that the best way to learn what the EPL is doing is to take an existing string and just play with the settings. Here is a sample FedEx label in EPL for you to start with. Remember - its just text.

(between the 2 'N's)

N OD10 q812 Q1624,24 D15 ZB LO0,459,800,4 LO0,713,800,4 LO0,1048,800,4 A35,321,0,2,1,1,N,"From:" A35,340,0,2,1,1,N,"SHIPPING DEPT" A35,360,0,2,1,1,N,"Company INC." A35,380,0,2,1,1,N,"1820 SMARKET BLVD" A35,401,0,2,1,1,N,"" A35,441,0,2,1,1,N,"(800) 999-9997" A490,381,0,2,1,1,N,"CAD: 12345/FXRS1060" A43,500,0,4,1,1,N,"TEST" A43,535,0,4,1,1,N,"123-45TH" A43,570,0,4,1,1,N,"" A35,421,0,2,1,1,N,"CHANHASSEN, MN 55317" A490,340,0,2,1,1,N,"Ship Date: 24NOV10" A490,360,0,2,1,1,N,"ActWgt: 12.0 LB" A43,465,0,4,1,1,N,"TEST" A615,465,0,2,1,1,N,"(320) 555-1212" A43,608,0,3,1,2,N,"ST CLOUD, MN 56301" A530,608,0,2,2,2,N,"(US)" LO670,550,105,10 LO670,560,10,112 LO765,560,10,112 LO670,672,105,10 LO476,315,4,145 A650,485,0,3,2,2,N,"FedEx" A690,568,0,5,2,2,N,"G" B80,1083,0,1E,4,2,290,N,"9612304400426670000014" A135,1397,0,4,1,1,N,"(9612302) 4000266 70000014" A783,700,3,1,1,1,N,"J10100912242124" A10,470,0,3,1,1,N,"TO" A25,1420,0,3,1,1,N,"GND" A25,1445,0,3,1,1,N,"Prepaid" A300,1425,0,3,1,1,N,"Hazmat" A300,1447,0,3,1,1,N,"DIRECT SIGN" b50,740,P,800,800,s5,f0,x2,y10,r80,o0,l12,"[)>010256301840302400426670000014FDEB40042663281/112.0LBN123-45THST CLOUDMNTEST0610ZGD00411ZTEST12Z320555121223ZN22ZN20Z0.0009KTEST99ZGHAZ028004249300 26Z822a" A645,1400,0,5,1,1,R,"HAZ" A580,1457,0,2,1,1,N,"Emergency Contact#" A580,1477,0,2,1,1,N,"8004249300" A16,670,0,1,1,1,N,"Ref: TEST" A16,685,0,1,1,1,N,"INV: " A16,700,0,1,1,1,N,"PO: TEST" A406,700,0,1,1,1,N,"Dept: " P1

N

As you can see the Coordinates are the first 2 sets per line.

A indicates text I believe.

b indicates barcode.

I dont know all the parameters off the top of my head, but you mentioned you had a manual so it should list those details for you.

Hope this helps.

OTHER TIPS

Here's a great blog post by Nicholas Piasecki how to send EPL code to the printer:
Sending Raw EPL2 Directly to a Zebra LP2844 via C#

I was using Zebra printers before (so I already knew EPL), but when I had to print from .NET the first time, I managed to get it to work just with the information from this blog post.

Note that the example code is in C#, but you can translate that to VB.NET.
(the post also mentions an external class named RawPrinterHelper which you can download from Microsoft - if you don't want to translate this to VB, just put it into a separate C# assembly and reference that in your VB project)

If you need to print images too, here's another blog post by the same guy about this:
Using the EPL2 GW command to send an image to a Zebra thermal printer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top