Closed bh4017 closed 5 years ago
There are two overloads for ZPLCommands.TextWrite. The Wiki uses this one:
public static byte[] TextWrite(int left, int top, ElementDrawRotation rotation, int height, string text, int codepage = 850)
This uses the last font the printer printed with. I will update with your suggestion though, in case the user's last font used didn't have the "Hello World!" characters defined...
Noticed as I edited the Wiki that clearly it wasn't using the overload I just quoted (just as you said). Thanks for the tip.
In the Wiki, the following example is provided:
page.AddRange(ZPLCommands.TextWrite(10, 150, ElementDrawRotation.NO_ROTATION, ZebraFont.STANDARD_NORMAL, 15, "Hello World!"));
But the TextWrite() method does not support these parameters. The closest overload is:
TextWrite(int left, int top, ElementDrawRotation rotation, ZebraFont font, int height, int width, string text, [int codepage = 850])
Here is a working example:
page.AddRange(ZPLCommands.TextWrite(10, 150, ElementDrawRotation.NO_ROTATION, ZebraFont.STANDARD_NORMAL, 15, 10, "Hello World!"));