JScript (WSH)ByteScout Barcode SDK

The following example demonstrates how to use BarCode SDK as ActiveX with Javascript and generate barcode images using non-visual Barcode class in Javascript (.jc files can be executed directly from Windows Explorer)

VISUAL BASIC 6 AND CLASSIC ASP SPECIAL NOTES: To use enumerations in VB6 or classic ASP you should use their integer values instead. To get integer value just check the documentation and you will see the integer value in the brackets. For example: (1) Code39.

var bc = WScript.CreateObject('Bytescout.BarCode.Barcode');

// set symbology to Code39
bc.Symbology = 1; // 1 = Code39 symbology type

// set barcode value to encode
bc.Value = "012345";

// Saving Code39 barcode to 'Code39.png'

bc.SaveImage ("Code39.png");

// Encoding '012345' using Aztec symbology

// set symbology to Aztec (2D)
// bc.Symbology = 17; // 17 = Aztec

// set barcode value to encode
bc.Value = "012345";

// Encoding '012345' using Aztec  symbology" & vbCRLF & bc.GetValueRestrictions(17), where 17 = Code39 symbology

bc.SaveImage ("Aztec.png");

bc = null