1

我在 Windows 7 32 位上运行来自 Zebra 的最新驱动程序并通过 USB 打印到 TLP2844。我正在尝试生成一组标签,并使用 RawPrinterHelper 类从 C# 将它们打印到标签打印机,如许多在线帖子中所述。如果我打开打印机电源并使用 oM 命令禁用初始 Esc 序列进纸,那么它可以完美运行并正确打印两个标签。此后,高度似乎不正确,因为它不是打印两个标签,而是打印一个标签,第二个文本朝向标签底部。任何帮助,将不胜感激。

标签尺寸:宽度:75mm 高度:34mm 间隙:3mm

发送到打印机的示例命令序列:

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
4

2 回答 2

1

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);
        }
    }
于 2010-11-15T20:30:24.297 回答
0

驱动程序会发送一个初始化序列,这可能会破坏您的标签。您能否通过将驱动程序的输出指向一个文件并查看驱动程序向下发送的内容来捕获驱动程序的输出?您可以使用驱动程序设置来确保它们是正确的

于 2010-11-16T02:40:16.177 回答