Navigation:  About the WebService >

The Encode Function

Previous pageReturn to chapter overviewNext page

The encode function is the heart of the IDAutomation Barcode WebService.  This function accepts numerous parameters, creates the barcode, and returns the image in the form of an XML stream.  The encode function accepts the following parameters:

Barcode (Boolean) -- the data to be encoded in the barcode.
X (Boolean) -- the X Dimension, or Narrow Bar Width, of the barcode, in CM. Default is .03.
Bar_Height (Float) -- the height, in CM, of the individual bars. Default is 1.
Check_Char (Boolean) -- 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 (Boolean) -- determines if the check character should be displayed in the human readable text.  Valid values are true and false.
PT (Boolean) -- determines if the tilde character should be used to check for ASCII codes. Valid values are true and false.
Show_Text (Boolean) -- determines if the human readable text should be displayed under the barcode. Valid values are True and False.
IR(Integer) -- image resolution. The resolution of the image measured in dots per inch (DPI). Default is 96.
Code_Type (String) -- the ID of the symbology of the barcode. Values are:
Code39
Code39Ext
Interleaved25
Code11
Codabar
MSI
UPCa
Ind25
Mat25
Code93
Ean13
Ean8
UPCe
Code128
Planet
Postnet

 

Code128_Set (Char) -- 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
Image_Type (String) -- The type of image to build into the XML string.  Valid inputs are GIF, JPG, TIFF, WMF, BMP, and PNG
Rotate (Integer) -- the orientation of the barcode. Valid values are 0, 90, 180, 270.
Left_Margin (Float) -- the distance between the left side of the image and the beginning of the barcode, in CM. Default is .2.
Top_Margin (Float) -- the distance between the top of the image and the top of the barcode, in CM. Default is .2.
Narrow_Wide (Float) -- 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.
Text_Margin (String) -- the distance between the bottom of the barcode and the top of the human readable text, in CM. Default is .2.
Postnet_Tall (Float) -- the height of the tall bars in a Postnet or Planet barcode, in CM. Default is .38.
Postnet_Short (Float) -- the height of the short bars in a Postnet or Planet barcode, in CM. Default is .2.
Postnet_Spacing (Float) -- the distance between bars in a Postnet or Planet barcode, in CM. Default is .1.