|
本帖最后由 来无影 于 2013-7-5 09:47 编辑
我曾经用过这个 ASP.NET Code 128 barcode generator library. 你可以看一下。 有一个样例代码, 如下:
Imports OnBarcode.BarcodeDim barcode As Linear = New Linear'Code 128 Barcode Basic Settingsbarcode.Type = BarcodeType.CODE128'Code 128 Valid data char set:'all 128 ASCII characters (Char from 0 to 127)barcode.Data = "112233445566"'Set the ProcessTilde property to true, if you want use the tilde character "~" 'to specify special characters in the input data. Default is false.''1) 1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255);' Strings from "~256" to "~299" are unused'2) 2-byte character (Unicode): ~6ddddd (character value from 00000 ~ 65535)' ASCII character '~' is presented by ~126; Strings from "~665536" to "~699999" are unusedbarcode.ProcessTilde = True' Barcode Size Related Settingsbarcode.UOM = UnitOfMeasure.PIXELbarcode.X = 1barcode.Y = 80barcode.LeftMargin = 0barcode.RightMargin = 0barcode.TopMargin = 0barcode.BottomMargin = 0barcode.Resolution = 96barcode.Rotate = Rotate.Rotate0' Barcode Text Settingsbarcode.ShowText = Truebarcode.TextFont = New Drawing.Font("Arial", 9.0F, Drawing.FontStyle.Regular)barcode.TextMargin = 6' Image format settingbarcode.Format = System.Drawing.Imaging.ImageFormat.Gif()barcode.drawBarcode("c://code-128.gif")这篇文章可能对你有用,你可以看下:guide for creating barcode in ASP.NET.
|
|