Label Length and Height not working as expected

Jan 20, 2015 at 10:40 PM
Edited Jan 20, 2015 at 10:49 PM
This might be a long shot, but maybe someone can help me out. I am using the EPL commands in LabVIEW to print very simple text labels with a Zebra TLP2824 but I'm not getting quite the output I want. Basically my margins are a little off so I want to adjust the printable area. I was previously using
R56,0
to set the horizontal and vertical offset instead of using "q" to set the label width. According to the EPL manual, R should set the X and Y axis reference points. As I understand it, this should take the entire print head width in dots, move 56 dots horizontally, and set that as the x position.

When I am using the PrinterSettings class, my available properties are:
AlignLeft
AlignTearOff
AlignTop

Darkness
id
Length
PrinterName
PrinterPort
PrinterType

PrintSpeed
RamDrive
Width

The items in bold are the ones that aren't working as expected or are unclear.

Since I'm writing it in LabVIEW, it's difficult to show what my code looks like, but the output to the printer is the following:
N
O
Q219,25
q0
S4
D7
ZB
JF
I8,0,001
A0,4,0,4,1,1,N,"Zebra"
A0,28,0,4,1,1,N,"TLP2824"
A0,52,0,4,1,1,N,"Test"
P1
The q0 line is the one that is bothering me the most. It is taking "Width" and "AlignLeft" and adding them. The "Q" line is taking my input and adding 10, and the number after the comma seems arbitrary. I can't find any input that will set an R value.

I also can't change the print direction (ZB is bottom of image buffer, ZT is top of image buffer), or change the options after "O". I also get errors when trying to set the codepage to I8,A,001 instead of I8,0,001 (this method returns an error in LabVIEW).

I'm sorry this is so wordy. If anyone can clarify any of the above inputs or help me figure out what inputs need to change, that would be extremely helpful. Thank you in advance!
Coordinator
Jan 30, 2015 at 1:05 PM
Edited Jan 30, 2015 at 1:11 PM
EPLCommands.ClearPrinter() method defines this. EPL only allows for a subset of commands, some of the printersettings are intended for ZPL only.

You are correct in most of your deductions on what this method does:
public static byte[] ClearPrinter(SharpZebra.Printing.PrinterSettings settings)
        {       
            return Encoding.GetEncoding(437).GetBytes(string.Format("\nN\nO\nQ{0},{1}\nq{2}\nS{3}\nD{4}\nZB\nJF\nI8,{5:x},{6:000}\n", settings.Length + 10, 25,
                settings.Width + settings.AlignLeft, settings.PrintSpeed, settings.Darkness, (int)Codepage8.DOS_437, (int)Codepage8KDU.USA));  
        }
Unfortunately this method was likely only written for what worked well enough for me at the time. If you want to update the method to be more useful, I'd be happy to incorporate it into the next version!