makeSimpleImage / makeImage Method

Generates a barcode image in memory and writes it to an OutputStream. makeSimpleImage is lightweight and is the recommended method for generating an image. makeImage uses more resources and requires your web server to run in graphics mode (e.g. X-Window) but it allows you to use the fonts of your choice.

Syntax

public void makeSimpleImage(int imageType, int width, int height, 
	boolean isBarWidth, java.io.OutputStream os) 
	throws Exception

public void makeImage(int imageType, int width, int height, 
	boolean isBarWidth, java.io.OutputStream os) 
	throws Exception

Parameters

imageType

Indicates the image format:

width

Specifies either the desired width for the entire barcode or the width of the thinnest bar, in screen pixels, depending on the value of the isBarWidth parameter. Typically, it's more convenient to specify the width of the thinnest bar rather than that of the entire barcode.

height

Specifies the height of the barcode in screen pixels.

isBarWidth

If true, it indicates that the width parameter is the width of the tinnest bar; otherwise, it's the width of the entire barcode.

os

OutputStream to which the barcode image is to be written to.