SaveImage Method

Generates a barcode image and save it to a file.

Syntax

object.SaveImage imageType, width, height, isBarWidth, filePath

Parameters

object

The Barcode Active Server Component

imageType

Numeric value indicating the image format:

width

Numeric value indicating 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

Numeric value indicating the height of the barcode in screen pixels.

isBarWidth

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

filePath

String indicating the aboslute file path to which the barcode image is to be saved.

Remarks

filePath must be an absolute file path. In ASP, to use a file path that's relative to the current HTML file, you must first convert it to an absolute path using the server.MapPath() method.

If the file already exists, it's overriden; otherwise, a new file is created. If this method fails to override or create a file, it'll throw an exception, in which case, please check your authories and the destination directory/file's permissions.