1

I'm trying to develop a c# app with xamarin forms to print some zpl commands but my printer is just printing text.

I've tried using Zebra SDK and Link-OS SDK to set the printer's language, but it keeps printing text.

Zebra SDK:

SGD.SET("device.languages", "zpl", printer.Connection);

or

printer.SendCommand("! U1 setvar \"device.languages\" \"zpl\"\r\n");
printer.SendCommand("^XA ^FX Third section with bar code. ^BY5,2,270 ^FO100,550^BC^FD12345678^FS ^XZ");

Link-OS:

conn.Write(new UTF8Encoding().GetBytes("! U1 setvar \"device.languages\" \"zpl\"\r\n"));
var t = new UTF8Encoding().GetBytes("^XA ^FX Third section with bar code. ^BY5,2,270 ^FO100,550^BC^FD12345678^FS ^XZ");
conn.Write(t);
John
  • 11
  • 1
  • I don't know if maybe this post helps? https://stackoverflow.com/questions/2044676/net-code-to-send-zpl-to-zebra-printers – Timothy G. Mar 02 '23 at 14:28
  • have you tried their samples? https://github.com/ZebraDevs/LinkOS-Xamarin-Samples – Jason Mar 02 '23 at 14:36
  • Wondering around their samples I managed to print some stuff with cpcl, I guess this model isnt compatible with zpl. Is there any way to print pdf or html files with cpcl? – John Mar 02 '23 at 16:36

1 Answers1

0

Install the printer with a Generic Text Based driver. The printer is expecting the commands to be sent as raw text.

If you have the printer set up with the Zebra driver, the driver is interpreting the text and sending it to the printer as an image to print.

EdHayes3
  • 1,777
  • 2
  • 16
  • 31