Zebra TLP2844 Windows 7 USB escape issue
I am on Windows 7 32bit running the latest drivers from Zebra and printing via USB to the TLP2844. I am trying to generate a set of labels and print them to the label printer from C# using the RawPrinterHelper class as mentioned in numerous posts online. If I power the printer up and use the oM command which is to disable the initial Esc sequence feed then it works perfectly and prints the two labels correctly. Thereafter the height appears to be incorrect because instead of printing two labels it prints one label with the second piece of text towards to bottom of the label. Any help would be appreciated.
Label Dimensions: Width: 75mm 开发者_StackOverflow中文版Height: 34mm Gap: 3mm
Example command sequence being sent to the printer:
oM
N
q599
Q272,024
ZT
S2
A253,26,0,3,1,1,N,"TEST LABEL TEXT"
P1
N
q599
Q272,024
ZT
S2
A253,26,0,3,1,1,N,"TEST LABEL2 TEXT"
P1
As you are disabling the detection of the top of a label the most likely culprit is your Q272,024
is not large enough. As you have not posted too much extra info I am not sure why you are using the oM
command from your example it does not seem necessary.
Try omitting the Q
and the oM
the device should be smart enough to be able to feed correctly on it's own. (make sure you have done a reset to make sure you cleared out any previous oM
's you may have sent) Also make sure you are in line mode and not page mode.
Here is a few classes i wrote up to convert from Inches or mm to dots I wrote for internal company use.
public static partial class Convert
{
/// <summary>
/// Converts number of dots in to millimeters in length
/// </summary>
/// <param name="dots">length in dots</param>
/// <returns>length in millimeters</returns>
public static float DotsToMm(int dots)
{
return dots * 0.125125f;
}
/// <summary>
/// Converts millimeters to dots in length.
/// </summary>
/// <param name="mm">length in millimeters</param>
/// <returns>length in dots</returns>
public static int MmToDots(float mm)
{
return (int)(mm / 0.125125f);
}
/// <summary>
/// Converts number of dots in to inches in length
/// </summary>
/// <param name="dots">length in dots</param>
/// <returns>length in inches</returns>
public static float DotsToInches(int dots)
{
return dots * 0.0049125f;
}
/// <summary>
/// Converts inches to dots in length.
/// </summary>
/// <param name="mm">length in inches</param>
/// <returns>length in dots</returns>
public static int InchesToDots(float Inches)
{
return (int)(Inches / 0.0049125f);
}
}
The driver sends down an initialization sequence which may be screwing up your labels. Can you capture the output of the driver by pointing it to a file and seeing what the driver is sending down? You can play with the driver settings to make sure they are correct
精彩评论