Zebra TLP2844 Windows 7 USB 转义问题

发布于 2024-10-03 03:32:48 字数 467 浏览 2 评论 0原文

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

标签尺寸: 宽度:75毫米 高度:34毫米 间隙: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

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
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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

ζ澈沫 2024-10-10 03:32:48

当您禁用标签顶部的检测时,最有可能的罪魁祸首是您的 Q272,024 不够大。由于您没有发布太多额外信息,我不确定为什么您在示例中使用 oM 命令,这似乎没有必要。


尝试省略 QoM 设备应该足够智能,能够自行正确供电。 (确保您已完成重置,以确保清除了您可能已发送的任何先前的oM)还要确保您处于行模式而不是页模式。


这是我编写的一些类,用于将英寸或毫米转换为我为公司内部使用编写的点。

 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);
        }
    }

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);
        }
    }
千年*琉璃梦 2024-10-10 03:32:48

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文