使用B-PAC SDK在C#应用程序不干胶标签印刷的发展 [英] Label printing development using b-pac SDK in a C# application
问题描述
我开发的 C#应用程序的POS系统在Visual Studio 2012 RC 。我在使用上打印标签打印机销售
兄弟的P-touch QL-500标签打印机。
我做了什么了。
- 我已经安装了最新的B-PAC SDK 3.0
- 成功添加引用到我的C#应用程序。
- 对于我已经安装了P-touch编辑5.0最新版本创建的标签模板。
-
做了一个模板(Mylabel.lbl)。
不过在这之前。
我跑了一些内置的例子,但这些例子会抛出异常。在谷歌做了很多搜索后,我发现,这是在打印机的驱动程序问题。
我无法安装驱动程序,因为驱动程序的安装需要连接一台打印机。 我没有打印机。
我需要做的
- 你有什么想法,我怎么能做到这一点的工作。
-
什么是使用打印标签的正确方法兄弟的P-touch QL-500标签打印机
请帮助我,我都在寻找做了很多的时间。计算器是我最后的希望。我是新来的这样的标签打印。请帮我将大大感激。
的围脖例如$ C $词现在用的。
bpac.DocumentClass DOC =新的DocumentClass();
如果(doc.Open(templateFile.lbx))
{
。doc.GetObject(字段1)文本=...;
。doc.GetObject(场2)文本=...;
doc.StartPrint(,PrintOptionConstants.bpoDefault);
doc.PrintOut(1,PrintOptionConstants.bpoDefault);
doc.EndPrint();
doc.Close();
}
这是例子code,而我试图。在第一行抛出一个异常
bpac.DocumentClass DOC =新的DocumentClass();
我还附加一个例外屏幕preVIEW。
我有相同的错误消息,发生异常时。 对我来说,解决办法是将平台目标为X86CPU。 这可以通过以下方式完成: (菜单)项目 - >属性 - >(标签),建设 - >目标平台中的x86 相反,任何CPU
的我已经开发的软件在Windows 7 64位。
您可以找到关于此的B-PAC SDK文档中的更多信息。 C:\ Program Files文件(x86)的\兄弟bPAC3 SDK \文档\ bPAC30_eng.chm 在一节故障排除,你会发现:该程序无法在64位操作系统上运行更改的平台。86,然后重新编译它。
此溶液与QL560的硬件连接到我的电脑测试和它的工作。
I am developing a C# application of POS system in Visual Studio 2012 RC. I have to print the sales on label printer using
Brothers P-Touch QL-500 Label printer.
WHAT I HAVE DONE ALREADY.
- I have installed latest b-pac SDK 3.0
- Successfully add reference to my C# application.
- For creating label templates i have installed latest version of p-touch Editor 5.0.
Made one template (Mylabel.lbl).
But before that.
I run some of the built in Examples but those examples Throws an Exception. After doing alot of search on Google I found that this is the printer's driver Problem.
i can't install the driver because Driver's installation requires a printer to be connected. I DON'T HAVE THE PRINTER.
WHAT I NEED TO DO
- Do you have any idea that how can i do this task.
what is the right way of printing a label using Brothers P-Touch QL-500 Label printer.
Please Help me I have done alot of time on searching. stackoverflow is my last hope. I am new to such label printing. Please help i will be greatly thankful.
The ruff example Code i am using.
bpac.DocumentClass doc = new DocumentClass();
if (doc.Open("templateFile.lbx"))
{
doc.GetObject("field1").Text = "...";
doc.GetObject("field2").Text = "...";
doc.StartPrint("", PrintOptionConstants.bpoDefault);
doc.PrintOut(1, PrintOptionConstants.bpoDefault);
doc.EndPrint();
doc.Close();
}
This is the example code which i am trying. the very first line throws an exception
bpac.DocumentClass doc = new DocumentClass();
I am Also attaching a Exception Screen Preview.
I had the exact same error message when the exception occurred. The solution for me was to set the "Platform target" to "X86" CPU. This can be done via: (menu) Project -> Properties -> (tab) Build -> Platform target "x86" Instead of "Any CPU"
I have developed the software on Windows 7 64 bit.
You can find more info about this in the b-PAC SDK documentation. C:\Program Files (x86)\Brother bPAC3 SDK\Doc\bPAC30_eng.chm In the section "Troubleshooting" you will find: "The program does not operate on a 64-bit operating system. Change the platform to "x86", and then recompile it."
This solution is tested with the QL560 hardware connected to my PC and it worked.
这篇关于使用B-PAC SDK在C#应用程序不干胶标签印刷的发展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!