【问题标题】:Printing Label Brother P-Touch from C# script从 C# 脚本打印标签 Brother P-Touch
【发布时间】:2014-12-08 13:27:11
【问题描述】:

我需要使用通过 USB 连接的 Brother P-Touch 9800 系列标签打印机打印标签。

我正在使用 SDK 中包含的示例项目,因此代码本身应该没有任何问题,但它不会打印。没有任何类型的错误消息,它不会停止或崩溃,它根本不会打印。 Bpac 参考已包含在内,并且正在包含在“使用 bpac”中。

        bpac.DocumentClass doc = new DocumentClass();
        if (doc.Open(templatePath) != false)
        {
            //doc.SetBarcodeData(123, "asd");
            doc.GetObject("objCompany").Text = txtCompany.Text;
            doc.GetObject("objName").Text = txtName.Text;

            Console.WriteLine(doc.GetObject("objName").Text);
            Console.WriteLine(doc.GetObject("objCompany").Text);

            // doc.SetMediaById(doc.Printer.GetMediaId(), true);
            doc.DoPrint(0, "0");
            doc.StartPrint("asdasd", PrintOptionConstants.bpoDefault);
            doc.PrintOut(1, PrintOptionConstants.bpoDefault);
            doc.EndPrint();
            doc.Close();
        }

我已经尝试从正常的编辑器打印,所以计算机有连接并且打印机可以工作。

任何人有任何建议或知道问题可能是什么?

【问题讨论】:

    标签: c# printing label


    【解决方案1】:

    如果以后有人想知道或遇到这个问题,我找到了解决方案。

    问题出在驱动程序上。显然 64 位驱动程序无法正常工作。为什么?我不知道。我安装了 32 位驱动程序,它立即工作。

    【讨论】:

    • 如何在 64 位系统上安装 32 位驱动程序? oO
    • 我遇到了同样的问题。我想解决方案是使用 64 位驱动程序和 sdk dll,但在 Visual Studio 中构建 x86 是可行的。见:Label printing development using b-pac SDK in a C# application
    • 标签打印机如何使用定制的p-touch模板文件?
    【解决方案2】:

    我遇到了同样的问题,我发现是驱动程序有问题。

    安装新驱动程序并单击“Windows 更新”。现在有不同的 QL 驱动程序。一些来自兄弟,一些来自微软。我试过微软的,现在它用相同的代码打印文档。

    【讨论】:

    • 我不确定你的意思。您从哪里获得用于标签打印机的 Microsoft 驱动程序?
    • 转到可以安装新驱动程序的打印机设置页面。现在有一个对话框,您可以在其中单击“Windows 更新”。 Windows 寻找新的驱动程序,之后您应该会看到两个不同的 ql550 或 p-touch 驱动程序 - 一个来自 Brother 本身,另一个来自 Microsoft。我安装了 MS,一切都很好。
    • 您是指设备管理器中的“更新驱动程序软件”吗?如果是这样,那么它只是告诉我我已经安装了最好的驱动程序。如果我检查兼容驱动程序列表,它只会显示 Brother 的驱动程序。
    • 啊,我明白你的意思了。不幸的是,当我更新时根本没有出现 9800PCN 驱动程序。
    猜你喜欢
    • 1970-01-01
    • 2019-08-26
    • 2014-03-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多