Index:
How to integrate barcode for .net linear package into your application?
Streaming the barcode image without Visual Studio .Net
This method is the easiest way to create a barcode in your application. It streams the barcode
image to the browser without saving any images to the server.
The following steps explains the process to install the Linear control.
-
Create a phasical folder to put all files. For example, folder 'barcode' under 'C:\Inetpub'.
Then create a folder name 'bin' under the folder created previously. For example 'C:\Inetpub\barcode\bin'.
-
Copy BarcodeNetLinear.dll in your demo package to folder C:\Inetpub\barcode\bin.
Copy BRLinear.aspx in your demo package to folder C:\Inetpub\barcode.
-
Create a virtual directory on the IIS web server.
- Open IIS Manager. In Widnwos XP, go to Control Panel/Administrative Tools/Internet Information Services
- Right click Default Web Site, under location computer/Web Sites on the left navigator bar.
- Click New | Virtual Directory ...
- Click Next button on the first screen.
- Enter the Alias name, for example 'barcode', so your url will be http://yourdomain.com/barcode. Click Next button.
- Browse to the physical directory created earlier. Click Next.
- Grant permissions to the directory. The default permissions will suffice for implementing this solution. Click Next.
- Click Finish
-
Start IIS. You have installed the package.
-
To verify your installation. Goto http://yourdomain/barcode/brlinear.aspx?barcode=123456789&CodeType=0.
You will view the created barcode image.
-
To create barcode image in your application, you can pass the url to IMG tag src value.
For example, <img src="http://yourdomain/barcode/brlinear.aspx?barcode=123456789&CodeType=0" />
How to customize barcode settings?
Properties:
- Barcode - The data to be encoded in the barcode.
- X - The XDimension, or Narrow Bar Width, of the barcode, in cm. Default is .03.
- BarHeight - The height, in cm, of the individual bars. Default is 1.
- CheckChar - Determines if a check character should be calculated for the symbology. Valid values are Y, y, Yes, TRUE, true. Default is Yes.
- CheckCharText - Determines if the check character should be displayed in the human readable text. Valid values are Y, y, Yes, TRUE, true. Default is Yes.
- Rotate - The orientation of the barcode. Valid values are 0, 90, 180, 270. Default is 0.
- ShowText - Determines if the human readable text should be displayed under the barcode. Valid values are Y, y, Yes, TRUE, true. Default is Yes.
- LeftMargin - The distance between the left side of the image and the beginning of the barcode, in cm. Default is .2.
- TopMargin - The distance between the top of the image and the top of the barcode, in cm. Default is .2.
- NarrowWide - The ratio between the narrow bars and wide bars in the symbologies that only contain narrow and wide bars such as Code 39, Interleaved 2 of 5 and MSI. Usually, this value is 2, 2.5 or 3. Default is 2.
- PT - Determines if the tilde character should be used to check for ASCII codes. Valid values are Y, y, Yes, TRUE, true. Default is Yes.
- TextMargin - The distance between the bottom of the barcode and the top of the human readable text, in cm. Default is .2.
- PostnetTall - The height of the tall bars in a Postnet or Planet barcode, in cm. Default is .38.
- PostnetShort - The height of the short bars in a Postnet or Planet barcode, in cm. Default is .2.
- PostnetSpacing - The distance between bars in a Postnet or Planet barcode, in cm. Default is .1.
- IR - Image resolution. The resolution of the image measured in dots per inch (DPI). Default is 96.
- CodeType - The ID of the symbology of the barcode. Values are:
0 = Code 3 of 9
1 = Extended ASCII Code 3 of 9
2 = Interleaved 2 of 5
3 = Code 11
4 = Codabar
5 = MSI
6 = UPCA
7 = Industrial 2 of 5
8 = MAT 2 of 5
9 = Code 93
10 = EAN13
11 = EAN8
12 = UPCE
13 = Code 128
14 = Planet
15 = Postnet
16 = Code 93 Ext
17 = UCC 128
18 = OneCode
- Code128Set - The Code 128 character set to use. Valid values are:
0 = Auto Mode (default & recommended setting)
1 = Character Set A
2 = Character Set B
3 = Character Set C
- CaptionBelow - The text to appear below the barcode.
- CaptionAbove - The text to appear above the barcode.
- BearerBarHorizontal - The size of the horizontal bearer bars. Valid values are from 0 -10.
- BearerBarVertical - The size of the vertical bearer bars. Valid values are from 0 -10.
- WhiteBarIncrease - The percentage of the X Dimension to increase the WHITE bars. Valid input are percentages less then 100, or decimals less then one.
- CharacterGrouping - The number of human readable digits to group together.