save

save(filePath, format)

Save barcode image to specific file in specific format.

ParameterTypeDescription
filePathStringPath to save to.
formatBarCodeImageFormatBarCodeImageFormat value (PNG, BMP, JPEG, GIF)

Example:

let generator = new BarCodeGenerator(EncodeTypes.CODE_128);
generator.save("file path", BarCodeImageFormat.GIF);