IDAutomation Linear Barcode Webservice Help

IDAutomationLinear.Linear Method 

The linear method is the most flexible method in the WebService. It takes many parameters, making it very customizable.

Note   A value must be entered for each parameter.

[Visual Basic]
Public Function Linear( _
   ByVal Barcode As String, _
   ByVal CodeType As String, _
   ByVal Code128Set As String, _
   ByVal ShowText As Boolean, _
   ByVal ApplyTilde As Boolean, _
   ByVal CheckChar As Boolean, _
   ByVal CheckCharText As Boolean, _
   ByVal ImageFormat As String, _
   ByVal Resolution As Integer, _
   ByVal Rotate As Integer, _
   ByVal LeftMargin As Single, _
   ByVal TopMargin As Single, _
   ByVal NarrowWide As Single, _
   ByVal TextMargin As String, _
   ByVal PostnetTall As Single, _
   ByVal PostnetShort As Single, _
   ByVal PostnetSpacing As String, _
   ByVal BackGroundColor As String, _
   ByVal BarcodeColor As String, _
   ByVal CodabarStartChar As String, _
   ByVal CodabarStopChar As String, _
   ByVal BarHeight As String, _
   ByVal XDimMils As String, _
   ByVal BearerBarHoriz As Integer, _
   ByVal BearerBarVert As Integer, _
   ByVal WhiteBarInc As String, _
   ByVal CharGrouping As Integer, _
   ByVal DPI As Integer _
) As Byte()
[C#]
public byte[] Linear(
   string Barcode,
   string CodeType,
   string Code128Set,
   bool ShowText,
   bool ApplyTilde,
   bool CheckChar,
   bool CheckCharText,
   string ImageFormat,
   int Resolution,
   int Rotate,
   float LeftMargin,
   float TopMargin,
   float NarrowWide,
   string TextMargin,
   float PostnetTall,
   float PostnetShort,
   string PostnetSpacing,
   string BackGroundColor,
   string BarcodeColor,
   string CodabarStartChar,
   string CodabarStopChar,
   string BarHeight,
   string XDimMils,
   int BearerBarHoriz,
   int BearerBarVert,
   string WhiteBarInc,
   int CharGrouping,
   int DPI
);

Parameters

Barcode
The actual data which will be encoded into the barcode.
CodeType
The sybmology which the barcode will be encoded into.
Code128Set
If CodeType is Code128, the Character Set to which will be used to encode the data. Options are 0 (Auto), A, B, and C.
ShowText
Determines whether or not to display the human readable text with the barcode.
ApplyTilde
Determines whether or not to use the tilde functionality.
CheckChar
Determines whether or not to encode a check digit into the barcode.
CheckCharText
Determines whether or not to show the check digit in the human readable text.
ImageFormat
The format to return encode the image. Options are JPG, GIF, TIFF, PNG, and BMP.
Resolution
The resolution in which the barcode should be produced. For onscreen solutions, use 96.
Rotate
The orientation of the barcode. Valid values are 0, 90, 180, 270.
LeftMargin
The distance between the left side of the image and the beginning of the barcode, in CM. If unsure, use ".2".
TopMargin
The distance between the top of the image and the top of the barcode, in CM. If unsure 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. If unsure, use 2.
TextMargin
The distance between the bottom of the barcode and the top of the human readable text, in CM. If unsure, use ".2".
PostnetTall
The height of the tall bars in a Postnet or Planet barcode, in CM. If unsure, use ".38"
PostnetShort
The height of the short bars in a Postnet or Planet barcode, in CM. If unsure, use ".1".
PostnetSpacing
The space between the postnet bars.
BackGroundColor
The name of the color to be used as the background of the barcode.
BarcodeColor
The name of the color to be used as the color of the bars and human readable text, if applicable.
CodabarStartChar
The start character for CODABAR. Valid values are "A", "B", "C" or "D".
CodabarStopChar
The stop character for CODABAR. Valid values are "A", "B", "C" or "D".
BarHeight
The height, in CM, of the individual bars. If unsure, use 1.
XDimMils
The width in mils (1/1000 of an inch) of the narrow bars. When unsure, use 10.
Note    Because the webservice defaults to a 96 DPI image (which is the resolution of web browser), the X dimension can only be adjusted in increments of .03 CM or 12 MILS. To allow other settings such as 17 mils, the image DPI must be increased to 203 or 300.
BearerBarHoriz
The size of the horizontal bearer bars. Valid values are 1-10.
BearerBarVert
The size of the vertical bearer bars. Valid values are 1-10.
WhiteBarInc
The amount to increase the whitespace. This is a percentage of the XDimension. IE, 20% will increase the whitebars by 20% of the XDimension.
CharGrouping
The number of digits to group together in the human readable. Valid inputs are 4,5, and 6.
DPI
The DPI which the barcode will be created at. Minimum value is 72 dpi. Maximum value is 600 dpi. Default value is 96 dpi.

Return Value

A barcode image encoded in a Byte array.

Example

This VB example shows how to call the Linear method.

Dim imageBarcode As Array
                  Dim service As New MyService1.IDAutomationLinear
                  imageBarcode = service.Linear(DataToEncode.Text, "Code128", "0", True, True, True, True, "JPG", 96, "1", 0.03, 0, 0.2, 0.2, 2, ".2", 0.38, 0.2, 0.1, "White", "Red","A","A","1","12",2,3,".20","4",96);)
        
This example shows how to use the Linear method in C#.
            Byte[] imgBarcode;
            MyService1.IDAutomationLinear service = new MyService1.IDAutomationLinear();
            imgBarcode=service.Linear(textBox1.Text, "Code128",(char) 0, true, true, true, true, "JPG", 96, "1", (float)0.03, 0, (float)0.2, (float)0.2, 2, ".2", (float)0.38, (float)0.2, "0.1", "White", "Red");

See Also

IDAutomationLinear Class | IDAutomationLinearWebService Namespace