Properties
Class Attribute | Applet & Servlet | Default Value | Comments |
---|---|---|---|
autoSize | see comments | True | If true, the size of the barcode
image will be auto decided. Otherwise, the size
should be specified with setSize(width, height). When using the applet or servlet, autoSize will automatically be set to false if the HEIGHT and WIDTH are specified. The performance will be improved by specifying the size and setting autoSize to false. |
barcodeType | BARCODE_TYPE | CODE128 (13) |
This is the type of barcode to create. Valid values for the barcode types are as follows: CODE39=0; CODE39EXT=1; INTERLEAVED25=2; CODE11=3; CODABAR=4; MSI=5; UPCA=6; IND25=7; MAT25=8; CODE93=9; EAN13=10; EAN8=11; UPCE=12; CODE128=13; CODE93EXT=14; POSTNET=15; PLANET=16; UCC128=17; ONECODE=18; the default is CODE128. Use the number value for the java library and the text value for the applet and servlet. For example, the servlet query string would include: &BARCODE_TYPE=ONECODE |
backgroundColor | BACK_COLOR | WHITE | The background color of the barcode. It is recommended to use the default setting of WHITE. Valid values are: RED, BLUE, GREEN, BLACK, GRAY, LIGHTGRAY, WHITE, DARKGRAY, YELLOW, ORANGE, CYAN and MAGENTA. The RGB numerical value of a color can also be used as a parameter (e.g. 0x00FF00 for green). |
barColor | BAR_COLOR | BLACK | The color of the bars. It is recommended to use the default setting of BLACK. Valid values are: RED, BLUE, GREEN, BLACK, GRAY, LIGHTGRAY, WHITE, DARKGRAY, YELLOW, ORANGE, CYAN and MAGENTA. The RGB numerical value of a color can also be used as a parameter (e.g. 0x00FF00 if green). |
barHeightCM | BAR_HEIGHT | 1 | The height of the bars in CM, which also adjusts the entire height of the barcode. |
bearerBarHori | BEARERBAR_HORIZONTAL | 0 | The size of the horizontal bearer bars. Valid values are 0-10 which are a multiple of X. |
bearerBarVert | BEARERBAR_VERTICAL | 0 | The size of the vertical bearer bars. Valid values are 0-10 which are a multiple of X. |
characterGrouping | CHARACTER_GROUPING | 0 | The number of digits which will be grouped together in the human readable text. Valid values are 0,3,4, and 5. |
CODABARStartChar | N/A | A | Starting character for CODABAR. Valid values are "A", "B", "C" or "D". |
CODABARStopChar | N/A | B | Stopping character for CODABAR. Valid values are "A", "B", "C" or "D". |
code | DATA | "" | This is the data text to be encoded in the barcode. The input is a string value type. A byte array may also be use in PDF417 or DataMatrix. |
Code128Set | CODE128_CHAR_SET | 0 | The set of characters to be used in Code128. Valid values are: 0, A, B or C. 0 is used for the automatic selection. It is recommended to leave this at the default setting. |
checkCharacter | ADD_CHECK_DIGIT | Y | If true, the software will calculate the check character automatically. The applet and servlet convert "Y" to true and "N" to false. |
textFontColor | TEXT_COLOR | BLACK | The color of the text below the barcode. Valid values are: RED, BLUE, GREEN, BLACK, GRAY, LIGHTGRAY, WHITE, DARKGRAY, YELLOW, ORANGE, CYAN and MAGENTA. The RGB numerical value of a color can also be used as a parameter (e.g. 0x00FF00 if green). |
leftMarginCM | N/A | .3 | The left margin in CM. This may need to be increased for UPC and EAN barcode types. |
N | N | 2 | The wide to narrow ratio. A value of 2 (the default), means that wide bars will be 2 times the width of narrow bars. This setting is only valid for barcode types that support an N dimension such as Code 39 and ITF. |
resolution | N/A | 38 | The resolution used to create the X dimension and other measurements in pixel; Default is 38 Pixels Per CM which is about 96 DPI. 96 DPI is the resolution of the web browser; this setting works best when using the servlet or when creating images for the web browser. |
rotateAngle | ROTATE_ANGLE | 0 | Indicates the rotate angle of the barcode. Valid values are 0 (normal), 90 (vertical), 180 (inverted) and 270 (inverted vertical). |
textFont | TEXT_FONT | Arial | The font used to display the human readable code. To change the font in the class library, use the following
syntax: Font font = new Font("Arial", Font.BOLD, 13); barcode.setFont(font); and to change the font in the applet or servlet, use this syntax: &TEXT_FONT=ARIAL|BOLD|13 |
setSize | WIDTH, HEIGHT | Null | Sets the size in pixels of the barcode image. If the size is set manually, autoSize must be false. When using the applet and servlet, autoSize is automatically set to false if the sizes ( HEIGHT and WIDTH) are manually specified. |
processTilde | N/A | TRUE | If true (or "Y" when using the applet or servlet) the tilde (~) will be processed. The default is True. |
showText | N/A | Y | If this value is true, the human readable text will be displayed with the barcode. The applet and servlet convert "Y" to true and "N" to false. |
textMarginCM | TEXT_MARGIN | 0.3 | The amount of space between the barcode and the human readable text. |
topMarginCM | N/A | .2 | The top margin of the barcode (also know as the quiet zone). |
UPCESystem | UPCE_SYSTEM | 0 | The encoding system to be used for UPC-E compression, valid values are 0 and 1. The default is 0. |
whiteBarIncrease | WHITE_BAR_INCREASE | 0 | The percentage of the XDimension to increase the white bars. Valid options are 0-99. |
X | X | .03 | This setting adjusts the width in centimeters of narrow bars, which also adjusts the entire width of the barcode. |