I create a program where its objective is to monitor the Fixed asset. One part of the system is print barcode in the zebra z4m plus 203dpi. how can I print on that device? I already try but the printed barcode is blurred. I use the bitmap and print it using the PrintDocument function of c#.
Asked
Active
Viewed 1,266 times
-1

Vic
- 457
- 1
- 6
- 23
2 Answers
2
You have to create a string with your ZPL code then send it to Z4M.
Can see how to do here : .NET code to send ZPL to Zebra printers
or with SharpZebra :
1) Install a Zebra Printer so it's accessible on your Print Queue (we're going to assume the name of your printer is ZDesigner S4M-203dpi ZPL).
2) Add a reference to the SharpZebra libraries to your project
3) Write the code below to print a label into a class
4) Run the code
PrinterSettings ps = new PrinterSettings();
ps.PrinterName = "ZDesigner S4M-203dpi ZPL";
ps.Width = 203 * 4;
ps.Length = 203 * 6;
ps.Darkness = 30;
List<byte> page = new List<byte>();
page.AddRange(ZPLCommands.ClearPrinter(ps));
page.AddRange(ZPLCommands.TextWrite(10, 150, ElementDrawRotation.NO_ROTATION, ZebraFont.STANDARD_NORMAL, 15, "Hello World!"));
page.AddRange(ZPLCommands.PrintBuffer(1));
new SpoolPrinter(ps).Print(page.ToArray());

Dohko
- 46
- 5
-
can you give example on how to print using the sharpzebra. I didn't know how to use that. – Vic May 30 '17 at 09:59
1
As far i know, you could use ZebraDesigner (check it on Zebra site) to dessing your label. ZebraDesigner creates a ZPL (or EPL) file this that label dessign. You can send this files to the printer using Serial Communication and the device prints the label

user3122306
- 245
- 2
- 4
- 15
-
if I create the design label that your telling, can I use that to print int c# and how? – Vic May 30 '17 at 09:22
-
With ZebraDesigner you 'build' a ZPL command set with your label layout. That command set are 'plain text' commands that Zebra printer can manage. You simple need to send that 'plain text' using Zebra printer communitacion interface (that can be RS-232, LPT, TCP/IP,...) – user3122306 May 30 '17 at 09:43