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新建一个窗体程序项目: ...
随机推荐
- hdoj 2122 Ice_cream’s world III
并查集+最小生成树 Ice_cream’s world III Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 ...
- cocos2d-x 3.0 开发(一) Hello_New_World
1.Previous On 2dx 2dx 的3.0版本是个与以往不同的版本.变化比2dx从1.x 到2.x的变化还要大不少.具体的新功能可以参见:CocoaChina大会见闻——cocos2 ...
- ASP.NET奇葩说
1.form表单 在asp.net中(即runat="server"特性时)method默认值为post 在html中默认是get. 2.Web应用程序项目和网站项目:前者后台文 ...
- mysql 索引建立
如何建立mysql索引? 创建索引原则 1.左前缀原则 : mysql索引匹配会从右匹配,到遇到( > < between like)终止.如 我们建立索引(a,b,c,d), a = ...
- 搭建maven+spring+mybatis工程
一.maven 命令搭建web项目 可以参考我之前的一篇博文maven快速入门 1.搭建web工程 mvn archetype:generate -DgroupId=com.yuanmeng.spri ...
- Remove “System Program Problem Detected” Messages From Ubuntu
One of my Ubuntu systems would pop up the following message multiple times after logging in: System ...
- JS 添加千分位,测试可以使用
JS 添加千分位,测试可以使用 <script language="javascript" type="text/javascript">funct ...
- PHP中获取中英文混合字符串长度[主要是指个数,而不是字符串长度](转)
今晚在写框架的表单验证类时,需要判断某个字符串长度是否在指定区间内,很自然地,想到了PHP中的strlen函数. $str = 'Hello world!'; echo strlen($str); ...
- 内核日志及printk结构浅析
作者:tekkamanninja 鸣谢:感谢ChinaUnix技术社区的tekkamanninja提供稿件 ,如需转载,请注明出处. 这段时间复习了一下内核调试系统,注意看了一下printk的实现 ...
- 《RESTful Web Services》第二章 识别资源
引言:开放RESTful Web服务的首要步骤之一是设计资源模型. 2.1 如何从领域名词中识别资源 2.2 如何选择资源粒度 一些因素会影响数据库表和对象模型的设计,例如领域建模.需要高 ...