Question

I have a c# app that connects to FedEx webservices, and want to print a shipping label on a thermal Zebra printer. I request the response to be in ZPLII type and save that response to a .txt file. I have talked to Zebra and FedEx and they both say that this should work. I use a generic print driver to connect to the zebra printer and still the printer is printing out tha actual characters of the txt file, not converting it into a label. Are there any characters that I am missing that FedEx does not automatically iunclude - like maybe a 'start print' , 'end print' character? Or does anyone have any idea to get this txt that I am recieving from web services to print? here is ZPLII response:

^XA^CF,0,0,0^PR12^MD30^PW800^POI^CI13^LH0,20
^FO12,139^GB753,2,2^FS
^FO12,405^GB777,2,2^FS
^FO464,8^GB2,129,2^FS
^FO32,10^AdN,0,0^FWN^FH^FDORIGIN ID: ZSMA^FS
^FO224,10^AdN,0,0^FWN^FH^FD(408) 986-4804^FS

I cut out the middle, I think the begining and end are the important parts, since the printer is not converting this text into a label

^FO83,768^GB1,26,1^FS
^FO25,794^GB58,1,1^FS
^FO31,774^AdN,0,0^FWN^FH^FD0201^FS
^PQ1
^XZ
Was it helpful?

Solution

It turns out my ZPL II code is fine. If anyone else comes across this , as far as I know - from what everyone has told me you cannot connect to a clients printer to send raw data to it from a c# web site or from any c# web app. The solution is to use either a java applet, flash, or silverlight to connect directly to the clients computer. I used jZebra java applet that communicates with jQuery front end and c# back end.

OTHER TIPS

I usually just send the raw data to the printer port as a fileCopy (I.E. Filecopy "c:\Label.txt" \computer\printersharename)

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