Need ZPL sample code for upload and call font from the print

May 14, 2014 at 3:16 AM
Hi there,

Would someone can provide the sample code to upload Windows Font to printer and call it via ZPL code? Many thanks.

Cheers,
sk
Coordinator
May 14, 2014 at 11:00 PM
The best way to upload the font is to use the Zebra setup utility. It's available here for now: https://km.zebra.com/kb/index?page=content&id=SO7889

Once it's uploaded, I use the printer's web server to find out what it was named (Mine was DAX000.FNT)

Then you can use ZPLCommands.TextWrite and specify this font:
PrinterSettings ps = new PrinterSettings();
ps.PrinterName = "ZDesigner S4M-203dpi ZPL";

List<byte> page = new List<byte>();
page.AddRange(ZPLCommands.ClearPrinter(ps));
page.AddRange(ZPLCommands.TextWrite(10, 10, ElementDrawRotation.NO_ROTATION, "DAX000.FNT", 'E', 70, "Hello, World!")

page.AddRange(ZPLCommands.PrintBuffer(1));
new SpoolPrinter(ps).Print(page.ToArray());
May 19, 2014 at 4:18 AM
rkone, thank you for your great help!

It is my first time deal with the zebra print and I can done my job with SharpZebra library.

Once again, thank you for help and the valuable information.