zxing.dll生成条码
引入zxing.dll
using System;
using System.Drawing;
using ZXing.QrCode;
using ZXing;
using ZXing.Common; namespace NKO_Printer_Core
{
public class BarcodeHelper
{
/// <summary>
/// 返回生成的Bitmap对象
/// </summary>
/// <param name="barcodeContent">条码内容</param>
/// <param name="barcodeFormat">条码格式</param>
/// <param name="height">条码高度</param>
/// <param name="width">宽度高度</param>
/// <returns></returns>
public static Bitmap CreateBarcode(string barcodeContent,BarcodeFormat barcodeFormat,int height,int width)
{
try
{
BarcodeWriter writer = new BarcodeWriter();
EncodingOptions options = new QrCodeEncodingOptions
{
DisableECI = true,
CharacterSet = "UTF-8",
Width = height,
Height = width
};
writer.Options = options;
writer.Format = barcodeFormat;
return writer.Write(barcodeContent); }
catch (Exception e)
{
return null;
}
}
}
}
zxing.dll生成条码的更多相关文章
- C#+ZXing.dll生成手机路径导航二维码
1.原谅我先写点废话哈 这两天用C#写一个C端的软件,甲方提出一个很无理的需求(在C端的程序中实现路径导航,关键是这个程序最终是运行在物理隔绝的电脑上的……),头疼了好几天,领导突然想到可以把坐标+百 ...
- ZXing.dll 生成二维码 C# winform net4.5
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- C# .Net 使用zxing.dll生成二维码,条形码
public static string GetBarcode(string format, string value, int? width, int? height) { ...
- C# 利用BarcodeLib.dll生成条形码(一维,zxing,QrCodeNet/dll二维码)
原文:http://blog.csdn.net/kongwei521/article/details/17588825 首先效果: 一.下载BarcodeLib.dll 下载地址 :http://do ...
- C# 利用BarcodeLib.dll生成条形码
首先效果: 1:首先下载BarcodeLib.dll 下载地址 http://pan.baidu.com/share/link?shareid=2590968386&uk=2148890391 ...
- zxing .net 多种条码格式的生成
下载地址:http://zxingnet.codeplex.com/ zxing.net是.net平台下编解条形码和二维码的工具,使用非常方便. 本文主要说明一下多种类型条码的生成. 适用的场景,标签 ...
- C# - VS2019调用ZXing.NET实现条码、二维码和带有Logo的二维码生成
前言 C# WinFrm程序调用ZXing.NET实现条码.二维码和带有Logo的二维码生成. ZXing.NET导入 GitHub开源库 ZXing.NET开源库githib下载地址:https:/ ...
- 译:c#生成条码的web控件
译文:http://www.codeproject.com/Tips/846860/Csharp-Barcode-Generator-Web-Control 在asp.net的web页用c#的web控 ...
- C#利用Zxing.net生成条形码和二维码并实现打印的功能
开篇:zxing.net是.net平台下编解条形码和二维码的工具. 下载地址:http://pan.baidu.com/s/1kTr3Vuf Step1:使用VS2010新建一个窗体程序项目: ...
随机推荐
- Android实例-退出程序(XE8+小米2)
unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Var ...
- shmget() -- 建立共享内存
#include <sys/ipc.h>#include <sys/shm.h>int shmget(key_t key, size_t size, int shmflg); ...
- <转>使用eclipse编译cocos2d-x示例项目,创建cocos2d-x android项目并部署到真机
准备 今天将cocos2d-x的示例项目tests编译到android真机运行,以及如何创建cocos2d-x的android项目. 打开cocos2d-x的tests项目,路径为:D:\cocos2 ...
- uva 11246 - K-Multiple Free set(数论)
题目链接:uva 11246 - K-Multiple Free set 题目大意:给定n,k.求一个元素不大于n的子集,要求该子集的元素尽量多,而且不含两个数满足a∗k=b. 解题思路:容斥原理.f ...
- C++ Primer 学习笔记_76_模板与泛型编程 --模板定义[续]
模板与泛型编程 --模板定义[续] 四.模板类型形參 类型形參由keywordclass或 typename后接说明符构成.在模板形參表中,这两个keyword具有同样的含义,都指出后面所接的名字表示 ...
- Jenkins(二)
官网:https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins 我的这篇文章不过简单的依据上文,介绍Jenkins提供了哪些功能.详细大家还是要 ...
- [Bootstrap] 8. 'Collapse', data-target, data-toggle & data-parent
Using Bootstrap JavaScript Plugins If we want to add behavior to our website, which of the following ...
- jquery实现无缝滚动
//点击上一页 $('.pointLeft').click(function() { if (prevAllow) { prevAllow = false; scrollUlLeft = scroll ...
- mysql之sql语句细节问题汇总
一.mysql count distinct null 使用注意事项 1 用一个例子来讲解一个问题,现在又一个库表hello,表内容如下: id name 1 Null 2 ...
- 关于c#中委托使用小结
一.简述: 委托对与我们编程人员来说,一点都不陌生,在实际工作过程中,或多或少都应该是接触过 但是对与编程新手来说,对与委托的理解和使用应该还是一个坎,但是只要理解清楚了,这个坎也就过去了. 最近也经 ...