ASP .NET Barcode Web Component
Advantage Package
User Manual & Tutorial
A license is required for each computer this software
is installed on;
this software may only be used according to the
License Agreement.
|
INDEX:
IDAutomation's ASP .NET Web Control Package may be executed in three different
ways. Review the three methods and decide which implementation would be best for the
desired outcome.
- Method 1; Streaming the barcode
image without Visual Studio .NET: This method "streams" the image
to the browser without saving any temp images to the server. This is the easiest
installation method where the barcode is created in an application as a
dynamic IMG tag and the barcode is modified from parameters passed; for example:
<img src="http://yourserver.com/VirtualDir/IDAutomationStreamingLinear.aspx?barcode=123456789012&Code_Type=0"/>.
For this install, (1) create a virtual directory on the web server, if
one has yet to be created, and (2) upload three files to that directory, the
barcodes are ready to be displayed. It is compatible with any application on
any operating system that can create a dynamic IMG tag.
- Method 2; Streaming the
barcode image for ASP.NET project integration: This method
"streams" the image to the browser without saving it to the server. This
implementation is similar to the above, except that the code behind method 2 can be used in
a Visual Studio .NET solution. Just as in the first method, there is the
option to create barcodes in another application as an IMG tag from parameters
passed.
- Method 3; Install the Server Control for
drag and drop use in an ASP.NET project: With this implementation,
the control is installed in the web solution (Visual Studio .NET, Borland
C# or Delphi for .NET) and used like any other server control. This method
allows the resolution to be changed which is necessary to print barcodes at
very precise X dimensions or if the printer printing the barcode is less than
300 DPI. This may be the easiest method of using the control and designing
applications in WYSIWYG mode. This implementation requires one temp file to
be created on the server for each barcode generated. However, the files are
small and are automatically deleted after
a specified time. Permanent files in many formats may also be created for
specific functions.
This method "streams" the image
to the browser without saving any temp images to the server. This is the easiest
installation method where the barcode is created in an application as a
dynamic IMG tag and the barcode is modified from parameters passed without
using Visual Studio .NET. This implementation also allows the web server to
become a barcode server that can create barcodes on the web in any
application on any operating system that can create a dynamic IMG tag.
The following steps illustrate this process with the Linear Server
Control. These steps will be the same for other IDAutomation Server
Controls. The only thing that will change is the file name for the image
generating web pages:
- Create a virtual directory on the web server, using IIS, to store the
three files necessary to display the barcodes. This step may be omitted
if the .aspx page is going to be called out of an existing virtual
directory. If these files are not placed in a virtual directory, an
error
will appear. A virtual
directory under IIS needs to be created from an existing physical directory. If the
physical directory does not exist, create one using My Computer or Windows
Explorer.
To create a virtual directory, follow these steps:
- Open IIS. This tool can be found under Administrative Tools on
the web server under the name Internet Information Services or
Information Services Manager.
- Right-click Default Web site.
- Click New | Virtual Directory.
- Click Next on the Welcome screen of the Virtual Directory Creation
Wizard.
- Enter the Alias name, the one that maps to the physical directory
created earlier. This is the name that is part of the URL. For example,
http://www.mydomain.com/myAlias. Click Next.
- 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.
- Create a folder named 'bin' under the physical directory.
- Extract all files from the zip file downloaded after the purchase has been received or from IDAutomation's evaluation version
download site.
- After these files are extracted, additional ZIP files will be found in the
destination directory. Extract all files from
IDAutomation_StreamingLinear_VB.zip.
- Copy IDAutomationStreamingLinear.aspx to the
physical directory. This is the page that displays the barcode.
- Copy IDAutomation.LinearServerControl.dll
and LinearStreamVB.dll to the bin directory
created under the physical directory.
- To verify the project is working correctly, view the actual streaming
aspx page in the browser from the local machine; for example:
http://localhost/myAlias/IDAutomationStreamingLinear.aspx
- The barcode can now be created in another application as an IMG tag from parameters passed; for example:
<img src="http://yourserver.com/myAlias/IDAutomationStreamingLinear.aspx?barcode=123456789012&
Code_Type=0&Bar_Height=2"/>
For a list of parameters.
- For an implementation example of this using
JavaScript.
- The X dimension is only adjustable within increments of .03cm (about
12 mil). For more information, see the
resolution notes.
The downloaded zip file contains a fully functional IDAutomationStreamingLinear.aspx page that may be included in the ASP.NET
project. The following steps outline a basic example for streaming images to a ASP.NET web page using image tags and HTML. To implement code-behind using Visual Studio .NET, reference the sample
project included in the ZIP file and the
LinearStreamCS.csproj or LinearStreamVB.csproj
file. These steps are the same for all IDAutomation Server Controls
except the file names will be slightly different.
- Extract all files from the zip file downloaded after the purchase
has been received or from IDAutomation's evaluation version
download site.
- After these files are extracted, additional ZIP files will be found in the
destination directory. Extract all files from the zip ending in VB if the
project is in Visual Basic or from CS for a C# project. In this example, IDAutomation_StreamingLinear_VB.zip
is used for a Visual Basic project.
- Locate the image generating web page aspx file from the extracted
files. Copy this file and all associated files to the ASP.NET project directory. The image generating ASP.NET
page for the linear control is IDAutomationStreamingLinear.aspx
and its associated files are
IDAutomationStreamingLinear.aspx.resx and
IDAutomationStreamingLinear.aspx.vb.
- Copy the IDAutomation Server Control DLL file to the ASP.NET project
directory. In this example, IDAutomation.linearservercontrol.dll
is used.
- Add a reference to the IDAutomation Server Control in the
project. For example: Right Click on References, choose Browse and select
the server control DLL.
- Add the IDAutomationStreamingLinear.aspx file to the ASP.NET project by right-clicking the name of
the project in Solution Explorer and selecting Add
Existing Item. The following graphic illustrates the reference to the DLL
and the image generating web page aspx file in a solution.

- Rebuild the solution or project.
- To verify the project is working correctly, view the actual streaming
aspx page in the browser; for example:
http://localhost/WebApplication1/IDAutomationStreamingLinear.aspx
Next, choose the method that will update the
properties of the barcode:
- Dynamic IMG Tag: The following code demonstrates how to pass
parameters changing the data to encode in the barcode and the X dimension of the
barcode via the URL Request. For a list of parameters.
<img src="IDAutomationStreamingLinear.aspx?barcode=0123456789012&Code_Type=0&Bar_Height=1.5"/>
- Code-behind: To implement code-behind using Visual Studio .NET, reference the
sample project included in the ZIP file and the
LinearStreamCS.csproj or
LinearStreamVB.csproj file. To the aspx page that needs to display the barcode image, add the
image tag referencing the image generating aspx page which was added to
the project. The following is an example of adding an HTML image
tag:
<img src="IDAutomationStreamingLinear.aspx"/>
Note: The Page_Load
event for the image generating .aspx page may be changed to hard-code specific values for the image that is to be displayed.
Resolution notes about methods 1 and 2:
The default resolution for the image is 96 DPI. This allows for
the image to be displayed properly in a browser. Using methods 1 and 2, the
X dimension adjustment is limited to increments of .03cm.
More about image resolution.
At times, it may be
necessary to increase the resolution of the image for printing purposes. However, increasing the resolution causes the image to display
proportionally larger in the browser. To compensate for this
problem, the size of the image can be reduced or expanded using HTML. The
following is an example of adjusting the size of the image based on HTML:
<img src="IDAutomationStreamingLinear.aspx?barcode=123456789012"
height="100px" width="400px"/>
If this process does not work in the application, then use
Method 3.
Step 1 - Install the control and setup security rights
-
Download and unzip the package. The DLL file will need to be placed in the bin
project directory for the web application that uses the DLL. For example, an
application named WebApplication1, needs the file to be in
C:\Inetpub\wwwroot\WebApplication1\bin as in the graphic below:
-
Create a subdirectory directly under the virtual directory. For example, an
application named WebApplication1, needs the subdirectory of
C:\Inetpub\wwwroot\WebApplication1\IDAutomation as in the graphic
below:

This directory will be used to hold the JPEG barcode images that are generated.
-
Grant the ASPNET user Modify and Write rights to the
IDAutomation sub directory just created. To do this in
Windows
Explorer; right-click on the folder and select Properties. Failure to
grant these rights will produce a "specified image could not be found" error.

Step 2 - Registering and using the server control in the web
application
After the control has been extracted to the application bin folder, then place it in the toolbox.
Registering the Server Control with an ASP .NET Web Application:
-
Open the solution or application and display the form to add the
barcode to. Choose View - Toolbox to display the Toolbox.
Right-click on the Toolbox and choose Customize Toolbox. Choose the .NET
Framework Components folder. Choose Browse and select the server
control.
-
After the control appears in the Toolbox, it can be added to the web form. The
control cannot be manually sized; this is by design to eliminate scanning
errors and to ensure the dimensions are accurate. To make the barcode wider,
change the XDimension property from .03cm to .06cm. By default, this is only
adjustable in increments of .03cm because the browser is limited to 96 DPI.

Registering the Server Control in Borland C# Builder or Delphi
for Microsoft®
.NET:
- Open the project. Choose Component - Installed .NET Components
from the menu. The Installed .NET Components dialog will appear.
- Ensure that the Installed .NET Components tab is selected and
then click on the Select an Assembly button.
- Navigate to the location where the IDAutomation Forms Control
was installed.
- Click Open and select the control.
- Click OK on the Installed .NET Components dialog.
- The barcode control will be in the General section of the Tools
Palette.
Using the control:
Once the control is placed on the form, it will appear in the web application
when it is compiled. To update the barcode with data, use the DataToEncode
property in the code-behind window. For example:
LinearBarcode1.DataToEncode = TextBox1.Text
The barcode can then be printed by the web browser.
Sizing the control:
The control cannot be sized manually because it must meet specific requirements
such as a precise Xdimension (narrow bar width) and barcode height specified
in the properties of the control. To increase the width, increase the XDimensionCM or XDimensionMILS property. To increase the height, increase the
BarHeightCM property. Because the control defaults to a 96 DPI image (which is
the resolution of the web browser), the Xdimension can only be adjusted in
increments of .03cm or 12mils. To allow other settings such as .045cm, the
image ImageResolution must be increased to 203
or 300.
Using the control as a DLL for creating JPEG, TIFF, BMP, PNG or
other graphic files on the server:
Since IDAutomation's control uses the .NET framework to perform image conversions,
a barcode image can be created in any format that .NET supports. This example using C#
creates the control in memory without placing it on the form.
- Using Visual Studio.NET C#
{
//Create an instance of the Linear barcode
server control
IDAutomation.LinearServerControl.LinearBarcode
MyBarCode = new IDAutomation.LinearServerControl.LinearBarcode();
//Set the symbology
MyBarCode.SymbologyID =
IDAutomation.LinearServerControl.LinearBarcode.Symbologies.Code39;
//Set the DataToEncode
MyBarCode.DataToEncode = "123456789012";
//Save the image. The first parameter is the
full path and file name of the image. The at sign preceding the parameter
allows us to
//use the slash characters in the file name. The
second parameter is the type of file to save; specify .bmp, gif, .jpeg, .png, etc.
MyBarCode.SaveImageAs(@"C:\Temp\Images\Test39.jpg",
System.Drawing.Imaging.ImageFormat.Jpeg
}
- Using Borland's C#Builder
//The following is an example of
changing the resolution of the barcode object and saving the image as a
JPEG.
barcode1.Resolution =
IDAutomation.LinearServerControl.LinearBarCode.Barcode.Resolutions.Custom;
//Define your own resolution size
barcode1.ResolutionCustomDPI = "300"; //Set the resolution
barcode1.XDimensionCM = "0.03"; //Set the X Dimension
//Here's where the file is saved.
barcode1.SaveImageAs("SavedBarcode300DPI.Jpeg",
System.Drawing.Imaging.ImageFormat.Jpeg);
barcode1.Resolution =
IDAutomation.Windows.Forms.LinearBarCode.Barcode.Resolutions.Printer;
//Reset the resolution to the default printer's DPI
If barcodes are going to be printed from a Pocket PC or Palm device that can
view web pages, use IDAutomation's web control to do so by enabling it on a web
page designed for the device. IDAutomation suggests enabling the PNG image type when
using Pocket PC. The PNG files are generally smaller than JPEG files and some
older Pocket PC browsers cannot display all JPEG files. View the
online demo of the Pocket PC barcode application.
After the control is inserted in the web application as described in step
2, adjust the properties of the control. This is accomplished either by
changing the properties with programming code or, if it is installed on a form,
right-click on the control and choose Properties.
This section explains the main configuration parameters and methods of the
control:
NOTE: Many of the barcode sizing parameters are calculated in cm (centimeters). Some barcode measurements are determined in "mils", which are
1/1000 of an inch. Use the following rules for conversions:
The default of .03cm is equal to about 12 mils
(which is read by most scanners) when printed.
To convert mils to cm, multiply the mils value by
.00254. For example, 12 mils * .00254 = .03cm.
To convert cm to mils, divide the cm value by 2.54.
For example, .03cm / 2.54 = 11.8 mils.
To convert inches to cm, multiply the value in inches
by 2.54.
Properties:
-
DataToEncode
- The data to be encoded in the barcode.
-
SymbologyID - The type of barcode to be used. The default is
Code 128. For more information on barcode types,
visit IDAutomation's barcoding for beginners site.
-
BarHeightCM
- The height of the barcode in cm. Default is 1 cm.
-
leftMarginCM
- The space of the left margin in cm.
-
XDimensionCM - Width in centimeters of the narrow bars. The default is
0.03cm, which is about .012" or 12 mils. This value might have to be increased if
the scanner cannot read barcodes with small Xdimensions. With a high
quality laser or CCD scanner, this value may be decreased to obtain a higher
density barcode. Because the control defaults to a 96 DPI image, the resolution
of a web browser, the Xdimension can only be adjusted in increments of .03cm or
12mils. To allow other settings such as .045cm, the image ImageResolution
must be increased to 203 or 300.
-
XDimensionMILS
- The width in mils (1/1000 of an inch) of the narrow bars.
-
ApplyTilde - In Code 128 auto, if set to "true", use the format ~ddd to specify the ASCII code of the character to be
encoded. Default is off. For example, by entering the following text in the
Data field: ~029NET it will actually be encoding GSNET Where GS
is a delimiter ASCII 29 character. Other commonly used ASCII codes are ~009 for
a tab and ~013 which is a return function. This property is only valid for Code
128 Auto.
-
CheckCharacter automatically adds the check digit to the barcode. The check digit is
required for all symbologies except Code 39, Industrial 2 of 5 and Codabar.
When using symbologies that do not require the check digit, the check digit may
be disabled.
-
CheckCharacterInText automatically adds the check digit that is encoded in the barcode
to the human readable text that is displayed. This is not applicable
to Code 128.
-
CodabarStartCharacter
- The start character for CODABAR. Valid values are "A", "B", "C" or "D".
-
CodabarStopCharacter - The
stop character for CODABAR. Valid values are "A", "B", "C" or "D".
-
Code128CharSet - The set of characters to be used in Code128. Valid
values are: AUTO, A, B or C. The default is AUTO. For more information on
Code 128, review
IDAutomation's Code 128
FAQ.
-
BackColor
- The background color of the barcode.
-
ForeColor
- The color of the foreground text and bars in the barcode.
-
ImageAutoDelete
- If set to True, this will automatically delete the image files after the amount of
minutes
specified in ImageTimeToLive. Default is True. If this is set to false, make
sure a method is in place to delete the files occasionally so the hard
drive does not fill up.
-
ImageConcurrentDeletions
- The number of files that may be concurrently deleted by a single user
session. Default is 10. A new user session is required to delete
existing images that have been created after their ImageTimeToLive
expires.
-
ImageTimeToLive
- The number in minutes to keep generated images on the server. Default is 10.
-
ImageFileName
- A read-only method that returns the name of the current file in the IDAutomation
sub folder.
-
ImageResolution
- Resolution of the created images. Do not change this setting
unless it is necessary. Because the control defaults to a 96 DPI image, which
is the resolution of the web browser, the Xdimension can only be adjusted in
increments of .03cm. To allow other settings such as .045cm, the image DPI
must be increased to 203 or 300. In addition, to support low resolution barcode
printers that are 203 DPI, this setting should reflect the printer's DPI.
Because the browser displays images at 96 DPI, they only look correct on the
screen at 96 DPI, however they will print correctly.
-
ImageType
- The type of image to be created; JPEG, GIF and PNG are supported.
-
Rotation indicates the orientation of the barcode. Valid values are 0 (normal), 90
(vertical),180 (inverted) and 270 (inverted vertical).
-
ShowText
- If this value is yes or true, the human readable text will be displayed with
the barcode.
-
StreamImage - Set this property to true if the barcode image should be
streamed to the browser instead of saved to the server's hard drive. Click here for
details on implementing this functionality.
-
TextMarginCM
- The distance between the lower portion of the barcode and the text.
-
TopMarginCM
- The top margin in cm.
-
Wide2NarrowRatio
- This is the wide to narrow ratio of 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. The default value is 2.
-
UPCESystem - The encoding system to be used for UPC-E, valid values are
0 and 1.
-
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.
Methods:
-
SaveImageAs (filename as string, format as ImageFormat) - This method allows the barcode object to be saved as an
image such as JPEG, GIF or PNG file. It also allows for conversion to any image type
that the framework supports. For example:
Barcode1.SaveImageAs(@"C:\Temp\Images\bar-code.png",
System.Drawing.Imaging.ImageFormat.Png)
PDF417: Read the
PDF417 FAQ for information about this symbology.
These properties are available only in the 2D version for
idautomation.pdf417servercontrol.dll.
-
XtoYRatio
- The X multiple height of individual cells; default=3, usually 2 to 4 times
the XDimensionCM (X).
- MacroPDFEnable - A boolean indicating that this barcode is part of
a MacroPDF sequence.
- MacroPDFFileID - Assigns a file id to the MacroPDF barcode. Each
barcode in the MacroPDF sequence must have the same file id assigned to it. Default
is 0; valid options are 0-899.
- MacroPDFSegmentIndex - The index number of this MacroPDF barcode in
relation to the set. Default is 0; valid options are 0-99998; each barcode
in the MacroPDF sequence must have a unique segment index.
- MacroPDFLastSegment - A boolean indicating that this is the final barcode
in the MacroPDF sequence.
-
PDFColumns - Control the width and height by increasing the number of data columns in the
PDF417 barcode. The default is 0 and the maximum is 30. When this is left at 0
the control will automatically adjust this setting.
-
PDFErrorCorrectionLevel
- The Reed Solomon error correction level placed in the symbol. More error
correction creates a larger symbol that can withstand more damage. Default = 0
for automatic selection.
-
PDFMode
- The default, (binary mode) encodes bytes of data and text mode encodes all
characters on the US keyboard plus returns and tabs. If encoding only
text, text mode can sometimes reduce symbol size.
-
PDFRows - The number of minimum rows in the symbol. If this setting is
left at 0 the control will automatically adjust this setting. It is best to
leave this alone, the number of rows should be automatically
generated.
-
ApplyTilde - If set to "true", use the format ~ddd to specify
the ASCII code of the character to be encoded. Default is true. Commonly used
ASCII codes are ~009 for a tab and ~013 which is a return function.
Data Matrix: Read the
DataMatrix FAQ for information about this symbology.
These properties are available only in the 2D version for
idautomation.datamatrixservercontrol.dll.
-
EncodingMode - The encoding mode that compresses information in the
symbol; valid values are, E_ASCII, E_C40, E_TEXT or E_BASE256 (default).
-
ASCII is used to encode data that mainly contains ASCII
characters (0-127). It encodes one alphanumeric or two numeric characters per
byte.
-
C40 is used to encode data that mainly contains numeric and
upper case characters. C40 encodes three alphanumeric data characters into two
bytes.
-
TEXT is used to encode data that mainly contains numeric and
lowercase characters. TEXT encodes three alphanumeric data characters into two
bytes.
-
BASE256 is used to encode bytes of data and 8 bit values.
-
More information about the modes.
-
PreferredFormat (DM_FORMAT): Sets the preferred format represented by a
number; valid values are from 0 (10X10) to 23 (144X144) for a square and from 24 (8X18) to
29 (16X48) for a rectangular symbol; This will be automatically determined if the size of the symbol
chosen is too small. More about
formats.
-
ProcessTilde - If true ("Y") the tilde (~) will be processed. For
example, use ~d032 for a space character, ~I for a tab
and ~M to encode a return.
-
~X is used to represent character values from 0 to 26. Replace the X
like in the following example ~@ = means character ASCII 0, ~A= means
character 1, ~B=means character 2, ~C=means character 3 ...
-
~dNNN represents the ASCII character encoded by the 3 digits NNN. For example,
~d065 represents the character 'A'.
-
~1 represents the character FNC1. When FNC1 appears in the first position (or
in the fifth position of the first symbol of a Structured Append), it will
indicate that the data conforms to the UCC/EAN Application Identifier standard
format.
-
More about the
tilde formatting.
MaxiCode: Read the
MaxiCode FAQ for information about this symbology.
These properties are available only in the 2D version for
idautomation.maxicodeservercontrol.dll.
NOTE: Maxicode symbols must be printed at 200 DPI or greater, therefore, the
image ImageResolution must be increased.
When Maxicode is used for UPS applications, it is recommended that the input be
a single complete string, formatted with the specifications that UPS requires
and using the ApplyTilde function to encode the RS, GS and EOT codes as
recommended in the Maxicode FAQ. For example:
[)>~03001~02996336260000~029840~029002~0291Z14647438~029UPSN~029410E1W~029195~029~0291/1~029~029Y~029135Lightner
~029TAMPA~029FL~030~004
-
ApplyTilde
- If set to "true", use the format ~ddd to specify the ASCII code of
the character to be encoded. Default is true. Commonly used ASCII codes are ~029
for GS, ~030 for RS, ~004 for EOT, ~009 for a tab and ~013 which is a return
function.
-
EncodingMode - Modes 2 and 3 are designed for use in the transport
industry. They encode the destination address and the class of service as
defined by the carrier. Mode 4 can encode up to 93 characters or 138 digits.
Mode 5 can only encode up to 77 characters, but it provides more error
correction capabilities than mode 4. Mode 6 indicates that the symbol encodes a
message used to program the reader system (scanner). Mode 2 is the default.
The following properties are only used in modes 2 and 3 and are ignored if the
data begins with [)>RS01GS
as explained here.
-
CountryCode
- A 3 digit number representing the country code.
-
ServiceClass
- A 3 digit number representing the service code.
-
ZipCode - The postal code; mode 2 uses a 9 digit numeric postal code and
mode 3 uses a 6 character alphanumeric postal code.
MICR:
The .NET MICR web control is used to print MICR E-13 on bank checks.
These properties are available only in the MICR control (idautomation.micrservercontrol.dll)
and the 2D version.
-
LeftMargin is the margin between the left of the control area and the
beginning of the text measured in inches. The default is .1.
-
TopMargin is the margin between the top of the control area and the top of the text
measured in inches. The default is .1.
-
BMP_Image is a read-only method that returns a bitmap representation of the image.
-
CharacterHeight scales the height of each character in proportion to the optimum, default
size of each character. For example, setting this to 2 doubles the height.
-
CharacterWidth scales the width of each character in proportion to the optimum, default size
of each character. For example, setting this to .5 decreases the width by 50%.
-
CharacterSpacing is the number of inches between each character. The default is .06 inches to
allow for the optimal 8 characters per inch threshold.
-
PrintIntensity is the intensity or darkness of the characters. There are 3 values that range
from darkest to lightest and they are Maximum, Nominal, and Minimum.
-
When troubleshooting MICR print issues, please refer to IDAutomation's
support incident concerning MICR
Advanced Properties (should only be performed by advanced programmers,
it is recommended to leave the default settings.)
-
AllowCustomPaths
- If set to True, allows custom paths for the files created. If AllowCustomPaths is false, all of the images are created in the IDAutomation
subdirectory of the directory where the page is being served. For
example:
LinearBarcode1.AllowCustomPaths =
true;
LinearBarcode1.ImageLocalPath=@"C:\Inetpub\wwwroot\Application1\Images\Barcode";
LinearBarcode1.ImageRelativePath=@"Images/Barcode";
-
ImageLocalPath - The local path to save images to. For example:
"C:\Inetpub\wwwroot\VirtDir\ImageDir". The ASPNET user must have Modify and
Write rights in this directory and
the directory cannot store the images outside of the virtual directory that is
running the page.
-
ImageRelativePath - The Image Relative Path to the images, for example:
with the path of C:\Inetpub\wwwroot\VirtDir\ImageDir (where the virtual
directory is VirtDir), enter ImageDir in this field. The relative
path is based off of the virtual directory of the website. If it is necessary
to use a slash for the relative path, make sure it is the forward slash ( / ). This
will allow the control to work properly on Macintosh web browsers.
Parameter names for IDAutomation.com Server Controls
Note: Parameter names are NOT case-sensitive, however values are
case-sensitive.
IDAutomationStreamingLinear.aspx specific parameters
(Note: (*) means
property applies to ALL image generating files)
- Barcode (*) - The data to be encoded in the barcode.
- X (*) - The XDimension, or Narrow Bar Width, of the
barcode, in cm. Default is .03.
- Bar_Height (*) - The height, in cm, of the individual
bars. Default is 1.
- Check_Char - Determines if a check character should be
calculated for the symbology. Valid values are Y, y, Yes, TRUE, true.
Default is Yes.
- Check_Char_Text - 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.
- Show_Text - Determines if the human readable text
should be displayed under the barcode. Valid values are Y, y, Yes,
TRUE, true. Default is Yes.
- Left_Margin (*) - The distance between the left side of
the image and the beginning of the barcode, in cm. Default is .2.
- Top_Margin (*) - The distance between the top of the
image and the top of the barcode, in cm. Default is .2.
- Narrow_Wide - 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.
- Text_Margin - The distance between the bottom of the
barcode and the top of the human readable text, in cm. Default is .2.
- Postnet_Tall - The height of the tall bars in a Postnet
or Planet barcode, in cm. Default is .38.
- Postnet_Short - The height of the short bars in a Postnet or Planet barcode, in cm. Default is .2.
- Postnet_Spacing - 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.
- Code_Type - 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
- 17 = UCC 128
- 18 = OneCode
- Code128_Set - 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.
IDAutomationStreamingPDF417.aspx specific parameters
Read the
PDF417 FAQ for information about this symbology.
- MODE - The encoding modes are:
- 1 = Text encoding
- 2 = binary encoding (default)
- TRN - Determines if the PDF417 barcode should be truncated. Valid
values are Y, y, Yes, TRUE, true. Default is false.
- ROWS - The number of rows in the barcode. If this setting is
left at 0 the control will automatically adjust this setting. It is best to
leave the Rows setting at 0, the number of rows should be automatically
generated.
- ECL - The level of Reed Solomon error correction. More error
correction creates a larger symbol that can withstand more damage.
Default = 0 for automatic selection.
- COL - The number of columns in the barcode. The default is 0
and the maximum is 30. When this is left at 0 the control will
automatically adjust this setting.
- XYR - Ration between the width of the bars and the height;
default is 3, usually 2 to 4 times the XDimensionCM (X).
- PT - Process Tilde; if set to "true", use the format
~ddd to specify
the ASCII code of the character to be encoded. Default is true. Commonly used
ASCII codes are ~009 for a tab and ~013 which is a return function.
IDAutomationStreamingMICR.aspx specific parameters
- Char_Height - The height of the individual MICR characters, in cm.
- Char_Width - The width of the individual MICR characters, in cm.
- Char_Space - The space between characters, in cm.
- PI - The print intensity associated with the characters.
IDAutomationMaxicodeImage.aspx specific parameters
Read the
MaxiCode FAQ for information about this symbology.
NOTE: Maxicode symbols must be printed at 200 DPI or greater.
When Maxicode is used for UPS applications, it is recommended that the
EncodingMode be set to either 2 or 3, the resolution to 203, and the input be
a single complete string, formatted with the specifications that UPS requires
and using the ApplyTilde function to encode the RS, GS and EOT codes as
recommended in the Maxicode FAQ. For example:
http://LocalHost/IDAutomationMaxicodeImage.aspx?MODE=2&IR=203&
BARCODE=[)>~03001~02996336260000~029840~029002~0291Z14647438~029UPSN~029410E1W~029195~029~0291/
1~029~029Y~029135Lightner~029TAMPA~029FL~030~004
- PC - Postal code. This is the zip code associated with
the barcode.
- CO - Country code. This is the country code associated with
the barcode.
- SC - Service class. This is the service class associated with
the barcode.
- MODE - The encoding modes are:
- 2 = Mode 2
- 3 = Mode 3
- 4 = Mode 4
- 5 = Mode 5
- 6 = Mode 6
- PT - Process Tilde; if set to "true", use the format
~ddd to specify the ASCII code of
the character to be encoded. Default is true. Commonly used ASCII codes are ~029
for GS, ~030 for RS, ~004 for EOT, ~009 for a tab and ~013 which is a return
function.
IDAutomationStreamingDataMatrix.aspx specific parameters
Read the
DataMatrix FAQ for information about this symbology.
- MODE - The encoding modes are:
- 0 = ASCII encoding - it is used to encode data that mainly contains
ASCII characters (0-127). It encodes one alphanumeric or two numeric
characters per byte.
- 1 = C40 encoding - it is used to encode data that mainly contains
numeric and upper case characters. C40 encodes three alphanumeric data
characters into two bytes.
- 2 = Text encoding - it is used to encode data that mainly contains
numeric and lowercase characters. TEXT encodes three alphanumeric data
characters into two bytes.
- 3 = Base256 encoding (default) - it is used to encode bytes of data
and 8 bit values.
- 4 = allow control do determine optimum encoding
More information about the modes is
documented here.
- PFMT - Preferred matrix format:
- 0 = allow control do determine the matrix size (default). More about
this is documented
here.
- 1 = 10 x 10
- 2 = 12 x 12
- 3 = 14 x 14
- 4 = 16 x 16
- 5 = 18 x 18
- 6 = 20 x 20
- 7 = 22 x 22
- 8 = 24 x 24
- 9 = 26 x 26
- 10 = 32 x 32
- 11 = 36 x 36
- 12 = 40 x 40
- 13 = 44 x 44
- 14 = 48 x 48
- 15 = 52 x 52
- 16 = 64 x 64
- 17 = 72 x 72
- 18 = 80 x 80
- 19 = 88 x 88
- 20 = 96 x 96
- 21 = 104 x 104
- 22 = 120 x 120
- 23 = 132 x 132
- 24 = 144 x 144
- 25 = 12 x 26
- 26 = 12 x 36
- 27 = 16 x 36
- 28 = 16 x 48
- 29 = 8 x 18
- 30 = 8 x 3
- PT - Process Tilde:
If true ("Y") the tilde (~) will be processed. For example, use ~d032 for a space character, ~I for a tab
and ~M to encode a return.
-
~X is used to represent character values from 0 to 26. Replace the X
like in the following example ~@ = means character ASCII 0, ~A= means
character 1, ~B= means character 2, ~C= means character 3 ...
-
~dNNN represents the ASCII character encoded by the 3 digits NNN. For
example,
~d065 represents the character 'A'.
-
~1 represents the character FNC1. When FNC1 appears in the first position (or
in the fifth position of the first symbol of a Structured Append), it will
indicate that the data conforms to the UCC/EAN Application Identifier standard
format.
-
More about the tilde formatting.
UPC-A, UPC-E, EAN-8 and EAN-13
Enter the data to be encoded without any spaces or dashes. Enter
the +2 and +5 add-on codes by just adding them to the end of the
string. If the check digit is added, it will be ignored and regenerated to
ensure that the code can be scanned. If the barcode is rotated by 270 degrees, the top
margin might have to be increased. For UPC-E, enter the full 11 or 12
digit UPC-A code and the barcode will be compressed if possible.
POSTNET and PLANET
When using the POSTNET barcode, the XDimensionCM (Narrow Bar Width) of .05cm
should be used. For barcodes to be acceptable to the US post offices, they
must be between 22 and 24 bars per inch. Setting the XDimensionCM to .05cm should
produce about 23 bars per inch. The printer setting may need to be adjusted if
the results are different.
Code 128
The "AUTO" setting for Code 128 will automatically switch character sets in
the barcode as necessary. IDAutomation's implementation of Code 128 auto has many options
as described below:
-
Encoding functions such as tabs and returns in Code128:
If ApplyTilde is set to "true", use the format ~ddd to specify the
ASCII code of the character to be encoded. For example, Code~009Bar~013
will create a barcode that encodes Code<Tab
Function>Bar<Return Function>. For
other functions, refer to
the ASCII chart.
-
Encoding UCC/EAN-128:
To encode alpha-numeric UCC/EAN-128, the character set is set to "AUTO" for
automatic. Then, ASCII 202 or character Ê is entered as the FNC1 before each AI
and the required start C is also included. For example, the UCC number of
(8100)712345(21)12WH5678 should be entered as: Ê8100712345Ê2112WH5678.
In most cases the AI's will be properly represented in the human-readable text.
If the parenthesis is not around the correct number for the AI, enter the
following extended ASCII character as the FNC1 for the correct number of digits
for the AI:
ASCII 212 = 2 digits
ASCII 213 = 3 digits
ASCII 214 = 4 digits
ASCII 215 = 5 digits
For example, to encode (1277)56, enter Ö127756.
-
For more information, please refer to the
UCC/EAN 128 section of the Code 128 FAQ or visit the
UCC website.
The following issues apply to the streaming methods 1 and 2 only:
- Error - "Server
Error in Application" Runtime Error :
The error may look something like this:
Server Error in '/' Application.
Runtime Error
Description: An application
error occurred on the server.
Details:
To enable the details...
<! -- Web.Config Configuration File --> |
This error is generated when the directory that
IDAutomationStreamingLinear.aspx is being run from is NOT set up as a
virtual directory under IIS with the ability to run applications. This
page and the associated DLLs can not be run simply out of a directory set up
under the root directory of the web server. A virtual directory must
be created, using IIS, mapped to the directory that has been created and
stores the page streaming the barcode images and the DLLs used to produce
the barcodes.
- Error - "Server Error
in Application" Parser Error :
The error may look something like this:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource
required to service this request. Please review the following specific
parse error details and modify the source file appropriately.
Parser Error Message: File or assembly name
IDAutomation.LinearServerControl, or one of its dependencies, was not
found. |
If this error is received, a reference to the server control DLL was not found.
Add a reference to the IDAutomation Server Control in the project. For
example: Right Click on References, Choose Browse and select the server
control DLL.
The following issues apply to the method 3 non-streaming
implementation only:
- IDAutomation subdirectory files:
The barcode images generated are high quality GIF, JPEG or PNG images that should
display in all web browsers. The files that are generated are stored in the IDAutomation subdirectory. By default, the control will automatically delete
the image files after the amount of minutes specified in ImageTimeToLive. Each
call to the web page produces a new image, which are then deleted by FIFO, first in
first out. If ImageAutoDelete is set to false, make sure a method is in
place to delete the files occasionally so the hard drive does not fill up.
Preferably, an administrator should create an automated task using the "AT"
command and a batch file that deletes all of the files in that directory during
a time when there are no users creating barcodes.
- IDAutomation has not conducted any benchmarks to measure server delay when there are files
being deleted. However, it would depend on the server CPU power, memory and
hard drive speed. If many files are to be deleted at once, it would
be best to write a simple batch process to clean out that folder containing the
images on a daily basis at a slow time for the server.
- IDAutomation subdirectory rights:
The ASPNET user must have Modify and Write rights to the
IDAutomation subdirectory. This can be done in Windows Explorer; right-click
on the folder and select "Properties". Failure to grant these rights will
produce a "specified image could not be found" error.
- Error - "Specified image could not be found":
This error is caused because either the IDAutomation directory does not exist
in the correct place or the ASPNET user does not have Modify and Write
rights to the IDAutomation directory. To resolve, review the
procedures in Step 1.
To obtain additional technical support for this product, please visit the
ASP.NET Technical Support Site where all reported problems are
documented.
Copyright © 2000-2006 IDAutomation.com, Inc. IDAutomation and BizFonts are registered trademarks of IDAutomation.com,
Inc. All
other
trademarks mentioned are the property of their respective owners.
Over 70% of Fortune
100 companies use IDAutomation's products to automate their businesses. |