BarcodeServlet represents a barcode image. You use it the same way you would a CGI program or a static image file in your HTML.
Syntax
<img src="http://path/BarcodeServlet">
<img src="http://path/BarcodeServlet?param1=value1¶m2=value2...>
Parameters
All the parameters are optional. You may use either the symbolic values or numeric values.
imageFormat
Indicates the image format:
barcodeType
Indicates the barcode type.
When using the symbolic names, the "BCT_" prefix must be removed. For example, for BCT_CODE39, you would have,barcodeType=CODE39or,
barcodeType=6
data
Specifies the barcode data.
addOnData
Specifies the barcode add-on data if the barcode has an add-on.
orientation
Specifies the orientation of the barcode image.
height
Indicates the height of the barcode image in screen pixels.
barWidth
Indicates the width of the thinnest barcode bar in screen pixels.
caption
Specifies the barcode caption.
addOnCaption
Specifies the barcode add-on caption.
fontName
Specifies the name of the font to be used (only SansSerif is available).
fontSize
Specifies the point size of the font to be used.
fontStyle
Specifies the font style. Only "plain" is available.
transparent
Indicates whether the image background is transparent ("true" or "false").
textPosition
Indicates where or whether the barcode caption is drawn.
addOnTextPosition
Indicates where or whether the add-on barcode caption is drawn.
uniBarHeight
Indicates whether to use the same bar height to draw all the bars for EAN and UPC barcodes ("true" or "false").
stretchText
Indicates whether to stretch the barcode caption in order for it to take the full width of the barcode ("true" or "false").
showCode39StartStop
Indicates whether to show * at the start and end of the caption of a Code 39 barcode ("true" or "false").
retainAspectRatio
Indicates whether to adjust the height of the barcode proportionally when the supplied width is automatically adjusted ("true" or "false").
upcSmallFont
Indicates whether to use a smaller font to draw the first and last digit of a UPC barcode caption ("true" or "false").
backColor
Indicates the color of the barcode background. This may be in the form of RRGGBB,
backColor=ff0000Alternatively, you may use the well-known name of a color ("white", "black", "red", "green", "blue"). The default is white.
foreColor
Indicates the color of the barcode foreground (bars and texts). This may be in the form of RRGGBB,
foreColor=00ff00Alternatively, you may use the well-known name of a color ("white", "black", "red", "green", "blue"). The default is black.
invalidDataAction
Indicates what to show if the barcode data is not valid.
checkCharShowMode
Indicates whether to show the barcode check character(s) in the barcode caption.
extraText
Specifies an extra text to display along with the barcode.
extraTextPosition
Specifies where to draw the extra text.
textOnly
If specified, only this text will be drawn without the barcode.
scale
Specifies a integer factor by which the image is to be scaled. If greater than one, the image size (as well as the font size) will be scaled by this factor relative to the specified size.