Bartender条码使用方法C#
来源:互联网 发布:apache 跨域访问配置 编辑:程序博客网 时间:2024/06/11 18:25
去官网下载10.1版本,http://www.bartender.cc/xiazai.html
安装在C盘较好吧C:\ProgramFiles (x86)\Seagull\BarTender Suite
再下载破解补丁软件http://www.cc.cc/soft/201508271679.html
这个破解补丁是希望安装在C盘的吧,哈哈。
破解后红框处不会出现“演示”二字,因为演示版在程序里不能打印
VS2005引用Seagull.BarTender.Print.dll,这个DLL文件在
C:\Program Files (x86)\Seagull\BarTenderSuite\SDK\Assemblies文件夹里
开始做个DEMO打印吧,VS2010代码如下
using System;
usingSystem.Collections.Generic;
usingSystem.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
usingSeagull.BarTender.Print;//这里不能少
using System.Diagnostics;
namespace test
{
public partialclassForm1 :Form
{
public Form1()
{
InitializeComponent();
}
private void button7_Click(object sender, EventArgs e)
{
try
{
Engine btEngine = new Engine();
btEngine.Start();
string lj = AppDomain.CurrentDomain.BaseDirectory + "mb\\test.btw";
LabelFormatDocument btFormat = btEngine.Documents.Open(lj);
//LabelFormatDocument btFormat = btEngine.Documents.Open(Path.Combine("D://Barcode//MR//MR//bin//Debug//mb", "test2" + ".btw"));
//对模版相应字段进行赋值
btFormat.SubStrings["tm"].Value = txt_barcode.Text;
btFormat.SubStrings["model"].Value = txt_part.Text;
//指定打印机名
btFormat.PrintSetup.PrinterName = "IT_Label";
//改变标签打印数份连载
btFormat.PrintSetup.NumberOfSerializedLabels = 1;
//打印份数
btFormat.PrintSetup.IdenticalCopiesOfLabel = 1;
//Result nResult = format.Print();
//btFormat.Print();
Messages messages;
int waitout = 10000; // 10秒 超时
Result nResult1 = btFormat.Print("标签打印软件", waitout, out messages);
btFormat.PrintSetup.Cache.FlushInterval = CacheFlushInterval.PerSession;
//不保存对打开模板的修改
//btFormat.Close(SaveOptions.DoNotSaveChanges);
//结束打印引擎
btEngine.Stop();
}
catch (Exception ex)
{
MessageBox.Show("Exception: " + ex.Message);
return;
}
}
BarTender的各种错误和解决方法
1:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
在app.config文件里设置
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
2:
Could not load file or assembly 'Seagull.BarTender.Print, Version=10.1.4.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7' or one of its dependencies. An attempt was made to load a program with an incorrect format.
其他信息: 未能加载文件或程序集“Seagull.BarTender.Print, Version=10.1.4.1, Culture=neutral, PublicKeyToken=109ff779a1b4cbc7”或它的某一个依赖项
于是在项目->属性->生成,将目标平台改成x86,编译即能通过。
- Bartender条码使用方法C#
- C#打印条码BarTender SDK
- 条码打印机编程使用方法 C#
- Delphi 调用BarTender打印条码
- Delphi 调用BarTender打印条码
- Bartender条码标签输出图片格式问题
- 快速对齐你的BarTender条码
- c# BarTender打印
- C#调用BarTender 错误
- C#调用BarTender 模板
- c# 使用bartender sdk 打印
- C#使用BarTender打印Label
- bartender条码打印软件2016下载 v11.0.3.1046
- BarTender打印出来的条码与设计的不同咋办
- 扫描不到BarTender中条码前缀如何处理
- BarTender出现条码打印位置不准的情况怎么办
- BarTender将条码下的数字嵌入到条码中的方法
- 条码打印机使用方法与选购指南
- 链式队列的基本操作
- 2017.8.09 SSL 模拟赛
- java8的特性
- 记录:成像与坐标系转换
- 2017年全国电子设计大赛A题问题重述
- Bartender条码使用方法C#
- 浅析Date与Calendar
- 闲聊软件测试自动化(1):测试自动化的好处我们知道多少?
- faster-rcnn:制作自己的数据集
- 装箱问题
- MediaCodec学习笔记
- 使用DBUtils查询数据,如果使用ArrayListHandler等都能够返回正确值,但使用BeanListHandler 和 BeanHandler则一直返回null
- 你不得不知的推进DevOps实践的四大趋势
- 起点