本软件下载地址未录入,如想要软件请评论,我们会补上!C# 调用 bartender 打印的示例(二次开发,含说明)需要先设计好Btw模板,然后代码调用模板去打印即可。
核心代码:
btFormat = btAPP.Formats.Open(System.Windows.Forms.Application.StartupPath+@"\1.btw", false, "");
btFormat.PrintSetup.IdenticalCopiesOfLabel = 1;//打印份数
btFormat.PrintSetup.NumberSerializedLabels = 1;//序列标签数
btFormat.SetNamedSubStringValue("打印文本", txtMemo.Text.Trim());
btFormat.SetNamedSubStringValue("打印条码", txtBarcode.Text.Trim());
btFormat.PrintOut(true, true);//第二个false设置打印时是否跳出打印属性
btFormat.Close(BarTender.BtSaveOptions.btDoNotSaveChanges); //退出时是否保存标签