SaveImage Method

Generates a barcode image and save it to a file.


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



The Barcode Active Server Component


Numeric value indicating the image format:


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.


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


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.


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


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.