Globals

Properties

AddressType

Address type

Properties

Name Type Optional Description

UNDETERMINED

 

 

Undetermined

STRUCTURED

 

 

Structured address

COMBINED_ELEMENTS

 

 

Combined address elements

CONFLICTING

 

 

Conflicting

AutoSizeMode

Specifies the different types of automatic sizing modes.
Default value is AutoSizeMode.NONE.

Example

//This sample shows how to create and save a BarCode image:
 let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX);
 generator.setAutoSizeMode(AutoSizeMode.NEAREST);
 generator.getBarCodeWidth().setMillimeters(50);
 generator.getBarCodeHeight().setInches(1.3f);
 generator.save("test.png", BarcodeImageFormat.PNG);

 

Properties

Name Type Optional Description

NONE

 

 

Automatic resizing is disabled. Default value.

NEAREST

 

 

Barcode resizes to nearest lowest possible size which are specified by BarCodeWidth and BarCodeHeight properties.

INTERPOLATION

 

 

Resizes barcode to specified size with little scaling but it can be little damaged in some cases because using interpolation for scaling. Size can be specified by BarcodeGenerator.BarCodeWidth and BarcodeGenerator.BarCodeHeight properties. This sample shows how to create and save a BarCode image in Scale mode. let generator = new BarcodeGenerator( EncodeTypes.DATA_MATRIX); generator.getParameters().getBarcode().setAutoSizeMode(AutoSizeMode.INTERPOLATION); generator.getParameters().getBarcode().getBarCodeWidth().setMillimeters(50); generator.getParameters().getBarcode().getBarCodeHeight().setInches(1.3); generator.save("test.png", BarcodeImageFormat.PNG);

AztecSymbolMode

Specifies the Aztec symbol mode.

Example

let generator = new BarcodeGenerator(EncodeTypes.AZTEC);
 generator.setCodeText("125");
 generator.getParameters().getBarcode().getAztec().setAztecSymbolMode(AztecSymbolMode.RUNE);
 generator.save("test.png", BarCodeImageFormat.PNG);

Properties

Name Type Optional Description

AUTO

 

 

Specifies to automatically pick up the best symbol (COMPACT or FULL-range) for Aztec. This is default value.

COMPACT

 

 

Specifies the COMPACT symbol for Aztec. Aztec COMPACT symbol permits only 1, 2, 3 or 4 layers.

FULL_RANGE

 

 

Specifies the FULL-range symbol for Aztec. Aztec FULL-range symbol permits from 1 to 32 layers.

RUNE

 

 

Specifies the RUNE symbol for Aztec. Aztec Runes are a series of small but distinct machine-readable marks. It permits only number value from 0 to 255.

BarcodeClassifications

BarcodeClassifications EncodeTypes classification

Properties

Name Type Optional Description

NONE

 

 

Unspecified classification

TYPE_1D

 

 

Specifies 1D-barcode

TYPE_2D

 

 

Specifies 2D-barcode

POSTAL

 

 

Specifies POSTAL-barcode

DATABAR

 

 

Specifies DataBar-barcode

COUPON

 

 

Specifies COUPON-barcode

BarCodeConfidence

Contains recognition confidence level

Example

//This sample shows how BarCodeConfidence changed, depending on barcode type
//Moderate confidence
let generator = new BarcodeGenerator(EncodeTypes.CODE_128, "12345");
generator.save("test.png");
let reader = new BarCodeReader("test.png", null,  [DecodeType.CODE_39_STANDARD, DecodeType.CODE_128]);
reader.readBarCodes().forEach(function(result, i, results)
{
   console.log("BarCode Type: " + result.getCodeTypeName());
   console.log("BarCode CodeText: " + result.getCodeText());
   console.log("BarCode Confidence: " + result.getConfidence());
   console.log("BarCode ReadingQuality: " + result.getReadingQuality());
});
//Strong confidence
let generator = new BarcodeGenerator(EncodeTypes.QR, "12345");
generator.save("test.png");
let reader = new BarCodeReader("test.png", null,  [DecodeType.CODE_39_STANDARD, DecodeType.QR]);
reader.readBarCodes().forEach(function(result, i, results)
{
    console.log("BarCode Type: " + result.getCodeTypeName());
    console.log("BarCode CodeText: " + result.getCodeText());
    console.log("BarCode Confidence: " + result.getConfidence());
    console.log("BarCode ReadingQuality: " + result.getReadingQuality());
});

Properties

Name Type Optional Description

NONE

 

 

Recognition confidence of barcode where codetext was not recognized correctly or barcode was detected as posible fake

MODERATE

 

 

Recognition confidence of barcode (mostly 1D barcodes) with weak checksumm or even without it. Could contains some misrecognitions in codetext or even fake recognitions if is low

STRONG

 

 

Recognition confidence which was confirmed with BCH codes like Reed–Solomon. There must not be errors in read codetext or fake recognitions

BarCodeImageFormat

Specifies the file format of the image.

Properties

Name Type Optional Description

BMP

 

 

Specifies the bitmap (BMP) image format.

GIF

 

 

Specifies the Graphics Interchange Format (GIF) image format.

JPEG

 

 

Specifies the Joint Photographic Experts Group (JPEG) image format.

PNG

 

 

Specifies the W3C Portable Network Graphics (PNG) image format.

TIFF

 

 

Specifies the Tagged Image File Format (TIFF) image format.

TIFF_IN_CMYK

 

 

Specifies the Tagged Image File Format (TIFF) image format in CMYK color model.

EMF

 

 

Specifies the Enhanced Metafile (EMF) image format.

SVG

 

 

Specifies the Scalable Vector Graphics (SVG) image format.

BorderDashStyle

Specifies the style of dashed border lines.

Properties

Name Type Optional Description

SOLID

 

 

Specifies a solid line.

DASH

 

 

Specifies a line consisting of dashes.

DOT

 

 

Specifies a line consisting of dots.

DASH_DOT

 

 

Specifies a line consisting of a repeating pattern of dash-dot.

DASH_DOT_DOT

 

 

Specifies a line consisting of a repeating pattern of dash-dot-dot.

ChecksumValidation

Enable checksum validation during recognition for 1D barcodes. Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible. Checksum never used: Codabar Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN Checksum always used: Rest symbologies

Example

//This sample shows influence of ChecksumValidation on recognition quality and results
let generator = new BarcodeGenerator(EncodeTypes.EAN_13, "1234567890128");
generator.save("test.png", BarcodeImageFormat.PNG);
let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
//checksum disabled
reader.setChecksumValidation(ChecksumValidation.OFF);
reader.readBarCodes().forEach(function(result, i, results)
{
   console.log("BarCode CodeText: " + result.getCodeText());
   console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
   console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
});
let reader = new BarCodeReader("test.png", DecodeType.EAN_13);
//checksum enabled
reader.setChecksumValidation(ChecksumValidation.ON);
reader.readBarCodes().forEach(function(result, i, results)
{
   console.log("BarCode CodeText: " + result.getCodeText());
   console.log("BarCode Value: " + result.getExtended().getOneD().getValue());
   console.log("BarCode Checksum: " + result.getExtended().getOneD().getCheckSum());
});

Properties

Name Type Optional Description

DEFAULT

 

 

If checksum is required by the specification - it will be validated.

ON

 

 

Always validate checksum if possible.

OFF

 

 

Do not validate checksum.

CodabarChecksumMode

Specifies the checksum algorithm for Codabar

Properties

Name Type Optional Description

MOD_10

 

 

Specifies Mod 10 algorithm for Codabar.

MOD_16

 

 

Specifies Mod 16 algorithm for Codabar (recomended AIIM).

CodabarSymbol

Specifies the start or stop symbol of the Codabar barcode specification.

Properties

Name Type Optional Description

A

 

 

Specifies character A as the start or stop symbol of the Codabar barcode specification.

B

 

 

Specifies character B as the start or stop symbol of the Codabar barcode specification.

C

 

 

Specifies character C as the start or stop symbol of the Codabar barcode specification.

D

 

 

Specifies character D as the start or stop symbol of the Codabar barcode specification.

Code128Emulation

Function codewords for Code 128 emulation. Applied for MicroPDF417 only. Ignored for PDF417 and MacroPDF417 barcodes.

Properties

Name Type Optional Description

NONE

 

 

No Code 128 emulation

CODE_903

 

 

UCC/EAN-128 emulation. Text compactionmode implied.

CODE_904

 

 

UCC/EAN-128 emulation. Numeric compactionmode implied.

CODE_905

 

 

UCC/EAN-128 emulation. Implied “01” AI and 14-digit codetext.

Code128SubType

Properties

Name Type Optional Description

CODE_SET_A

 

 

ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4 ///

CODE_SET_B

 

 

ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4 ///

CODE_SET_C

 

 

00–99 (encodes two digits with a single code point) and FNC1 ///

CodeLocation

Codetext location

Properties

Name Type Optional Description

BELOW

 

 

Codetext below barcode.

ABOVE

 

 

Codetext above barcode.

NONE

 

 

Hide codetext.

CustomerInformationInterpretingType

Defines the interpreting type(C_TABLE or N_TABLE) of customer information for AustralianPost BarCode.

Examples

let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "5912345678ABCde");
generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.C_TABLE);
image = generator.generateBarCodeImage();
let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.C_TABLE);
reader.readBarCodes().forEach(function(result, i, results)
{
    console.log("BarCode Type: " + result.getCodeType());
    console.log("BarCode CodeText: " + result.getCodeText());
});
generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456781234567");
 generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.N_TABLE);
 image = generator.generateBarCodeImage();
 reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
 reader.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.N_TABLE);
reader.readBarCodes().forEach(function(result, i, results)
{
    console.log("BarCode Type: " + result.getCodeType());
    console.log("BarCode CodeText: " + result.getCodeText());
});
let generator = new BarcodeGenerator(EncodeTypes.AUSTRALIA_POST, "59123456780123012301230123");
generator.getParameters().getBarcode().getAustralianPost().setAustralianPostEncodingTable(CustomerInformationInterpretingType.OTHER);
image = generator.generateBarCodeImage();
let reader = new BarCodeReader(image, DecodeType.AUSTRALIA_POST);
reader.CustomerInformationInterpretingType = CustomerInformationInterpretingType.OTHER);
reader.readBarCodes().forEach(function(result, i, results)
{
   console.log("BarCode Type: " + result.getCodeType());
   console.log("BarCode CodeText: " + result.getCodeText());
});

Properties

Name Type Optional Description

C_TABLE

 

 

Use C_TABLE to interpret the customer information. Allows A..Z, a..z, 1..9, space and # sing.

N_TABLE

 

 

Use N_TABLE to interpret the customer information. Allows digits.

OTHER

 

 

Do not interpret the customer information. Allows 0, 1, 2 or 3 symbol only.

DataMatrixEccType

Specify the type of the ECC to encode.

Properties

Name Type Optional Description

ECC_AUTO

 

 

Specifies that encoded Ecc type is defined by default Reed-Solomon error correction or ECC 200.

ECC_000

 

 

Specifies that encoded Ecc type is defined ECC 000.

ECC_050

 

 

Specifies that encoded Ecc type is defined ECC 050.

ECC_080

 

 

Specifies that encoded Ecc type is defined ECC 080.

ECC_100

 

 

Specifies that encoded Ecc type is defined ECC 100.

ECC_140

 

 

Specifies that encoded Ecc type is defined ECC 140.

ECC_200

 

 

Specifies that encoded Ecc type is defined ECC 200. Recommended to use.

DataMatrixEncodeMode

DataMatrix encoder's encoding mode, default to AUTO

Properties

Name Type Optional Description

AUTO

 

 

Automatically pick up the best encode mode for datamatrix encoding

ASCII

 

 

Encodes one alphanumeric or two numeric characters per byte

FULL

 

 

Encode 8 bit values

CUSTOM

 

 

Encode with the encoding specified in BarCodeGenerator.CodeTextEncoding

C40

 

 

Uses C40 encoding. Encodes Upper-case alphanumeric, Lower case and special characters

TEXT

 

 

UUses TEXT encoding. Encodes Lower-case alphanumeric, Upper case and special characters

EDIFACT

 

 

Uses EDIFACT encoding. Uses six bits per character, encodes digits, upper-case letters, and many punctuation marks, but has no support for lower-case letters.

ANSIX12

 

 

Uses ANSI X12 encoding.

EXTENDED_CODETEXT

 

 

ExtendedCodetext mode allows to manually switch encodation schemes in codetext. Allowed encodation schemes are: EDIFACT, ANSIX12, ASCII, C40, Text, Auto. Extended codetext example: @"\ansix12:ANSIX12TEXT\ascii:backslash must be \ doubled\edifact:EdifactEncodedText" All backslashes () must be doubled in text.

DecodeType

Specify the type of barcode to read.

Example

//This sample shows how to detect Code39 and Code128 barcodes.
let reader = new BarCodeReader("test.png", null,  [ DecodeType.CODE_39_STANDARD, DecodeType.CODE_128 ]);
reader.readBarCodes().forEach(function(result, i, results)
{
   console.log("BarCode Type: " + result.getCodeTypeName());
   console.log("BarCode CodeText: " + result.getCodeText());
});

Properties

Name Type Optional Description

NONE

 

 

Unspecified decode type.

CODABAR

 

 

Specifies that the data should be decoded with {@code CODABAR} barcode specification

CODE_11

 

 

Specifies that the data should be decoded with {@code CODE 11} barcode specification

CODE_39_STANDARD

 

 

Specifies that the data should be decoded with {@code Standard CODE 39} barcode specification

CODE_39_EXTENDED

 

 

Specifies that the data should be decoded with {@code Extended CODE 39} barcode specification

CODE_93_STANDARD

 

 

Specifies that the data should be decoded with {@code Standard CODE 93} barcode specification

CODE_93_EXTENDED

 

 

Specifies that the data should be decoded with {@code Extended CODE 93} barcode specification

CODE_128

 

 

Specifies that the data should be decoded with {@code CODE 128} barcode specification

GS_1_CODE_128

 

 

Specifies that the data should be decoded with {@code GS1 CODE 128} barcode specification

EAN_8

 

 

Specifies that the data should be decoded with {@code EAN-8} barcode specification

EAN_13

 

 

Specifies that the data should be decoded with {@code EAN-13} barcode specification

EAN_14

 

 

Specifies that the data should be decoded with {@code EAN14} barcode specification

SCC_14

 

 

Specifies that the data should be decoded with {@code SCC14} barcode specification

SSCC_18

 

 

Specifies that the data should be decoded with {@code SSCC18} barcode specification

UPCA

 

 

Specifies that the data should be decoded with {@code UPC-A} barcode specification

UPCE

 

 

Specifies that the data should be decoded with {@code UPC-E} barcode specification

ISBN

 

 

Specifies that the data should be decoded with {@code ISBN} barcode specification

STANDARD_2_OF_5

 

 

Specifies that the data should be decoded with {@code Standard 2 of 5} barcode specification

INTERLEAVED_2_OF_5

 

 

Specifies that the data should be decoded with {@code INTERLEAVED 2 of 5} barcode specification

MATRIX_2_OF_5

 

 

Specifies that the data should be decoded with {@code Matrix 2 of 5} barcode specification

ITALIAN_POST_25

 

 

Specifies that the data should be decoded with {@code Italian Post 25} barcode specification

IATA_2_OF_5

 

 

Specifies that the data should be decoded with {@code IATA 2 of 5} barcode specification. IATA (International Air Transport Association) uses this barcode for the management of air cargo.

ITF_14

 

 

Specifies that the data should be decoded with {@code ITF14} barcode specification

ITF_6

 

 

Specifies that the data should be decoded with {@code ITF6} barcode specification

MSI

 

 

Specifies that the data should be decoded with {@code MSI Plessey} barcode specification

VIN

 

 

Specifies that the data should be decoded with {@code VIN} (Vehicle Identification Number) barcode specification

DEUTSCHE_POST_IDENTCODE

 

 

Specifies that the data should be decoded with {@code DeutschePost Ident code} barcode specification

DEUTSCHE_POST_LEITCODE

 

 

Specifies that the data should be decoded with {@code DeutschePost Leit code} barcode specification

OPC

 

 

Specifies that the data should be decoded with {@code OPC} barcode specification

PZN

 

 

Specifies that the data should be decoded with {@code PZN} barcode specification. This symbology is also known as Pharma Zentral Nummer

PHARMACODE

 

 

Specifies that the data should be decoded with {@code Pharmacode} barcode. This symbology is also known as Pharmaceutical BINARY Code

DATA_MATRIX

 

 

Specifies that the data should be decoded with {@code DataMatrix} barcode symbology

GS_1_DATA_MATRIX

 

 

Specifies that the data should be decoded with {@code GS1DataMatrix} barcode symbology

QR

 

 

Specifies that the data should be decoded with {@code QR Code} barcode specification

AZTEC

 

 

Specifies that the data should be decoded with {@code Aztec} barcode specification

PDF_417

 

 

Specifies that the data should be decoded with {@code Pdf417} barcode symbology

MACRO_PDF_417

 

 

Specifies that the data should be decoded with {@code MacroPdf417} barcode specification

MICRO_PDF_417

 

 

Specifies that the data should be decoded with {@code MicroPdf417} barcode specification

CODABLOCK_F

 

 

Specifies that the data should be decoded with {@code CodablockF} barcode specification

MAILMARK

 

 

Specifies that the data should be decoded with Royal Mail Mailmark barcode specification.

AUSTRALIA_POST

 

 

Specifies that the data should be decoded with {@code Australia Post} barcode specification

POSTNET

 

 

Specifies that the data should be decoded with {@code Postnet} barcode specification

PLANET

 

 

Specifies that the data should be decoded with {@code Planet} barcode specification

ONE_CODE

 

 

Specifies that the data should be decoded with USPS {@code OneCode} barcode specification

RM_4_SCC

 

 

Specifies that the data should be decoded with {@code RM4SCC} barcode specification. RM4SCC (Royal Mail 4-state Customer Code) is used for automated mail sort process in UK.

DATABAR_OMNI_DIRECTIONAL

 

 

Specifies that the data should be decoded with {@code GS1 DATABAR omni-directional} barcode specification

DATABAR_TRUNCATED

 

 

Specifies that the data should be decoded with {@code GS1 DATABAR truncated} barcode specification

DATABAR_LIMITED

 

 

Specifies that the data should be decoded with {@code GS1 DATABAR limited} barcode specification

DATABAR_EXPANDED

 

 

Specifies that the data should be decoded with {@code GS1 DATABAR expanded} barcode specification

DATABAR_STACKED_OMNI_DIRECTIONAL

 

 

Specifies that the data should be decoded with {@code GS1 DATABAR stacked omni-directional} barcode specification

DATABAR_STACKED

 

 

Specifies that the data should be decoded with {@code GS1 DATABAR stacked} barcode specification

DATABAR_EXPANDED_STACKED

 

 

Specifies that the data should be decoded with {@code GS1 DATABAR expanded stacked} barcode specification

PATCH_CODE

 

 

Specifies that the data should be decoded with {@code Patch code} barcode specification. Barcode symbology is used for automated scanning

ISSN

 

 

Specifies that the data should be decoded with {@code ISSN} barcode specification

ISMN

 

 

Specifies that the data should be decoded with {@code ISMN} barcode specification

SUPPLEMENT

 

 

Specifies that the data should be decoded with {@code Supplement(EAN2, EAN5)} barcode specification

AUSTRALIAN_POSTE_PARCEL

 

 

Specifies that the data should be decoded with {@code Australian Post Domestic eParcel Barcode} barcode specification

SWISS_POST_PARCEL

 

 

Specifies that the data should be decoded with {@code Swiss Post Parcel Barcode} barcode specification

CODE_16_K

 

 

Specifies that the data should be decoded with {@code SCode16K} barcode specification

MICRO_QR

 

 

Specifies that the data should be decoded with {@code MicroQR Code} barcode specification

COMPACT_PDF_417

 

 

Specifies that the data should be decoded with {@code CompactPdf417} (Pdf417Truncated) barcode specification

GS_1_QR

 

 

Specifies that the data should be decoded with {@code GS1 QR} barcode specification

MAXI_CODE

 

 

Specifies that the data should be decoded with {@code MaxiCode} barcode specification

MICR_E_13_B

 

 

Specifies that the data should be decoded with {@code MICR E-13B} blank specification

CODE_32

 

 

Specifies that the data should be decoded with {@code Code32} blank specification

DATA_LOGIC_2_OF_5

 

 

Specifies that the data should be decoded with {@code DataLogic 2 of 5} blank specification

DOT_CODE

 

 

Specifies that the data should be decoded with {@code DotCode} blank specification

GS_1_DOT_CODE

 

 

Specifies that the data should be decoded with {@code GS1 DotCode} blank specification

DUTCH_KIX

 

 

Specifies that the data should be decoded with {@code DotCode} blank specification

HIBC_CODE_39_LIC

 

 

Specifies that the data should be decoded with {@code HIBC LIC Code39} blank specification

HIBC_CODE_128_LIC

 

 

Specifies that the data should be decoded with {@code HIBC LIC Code128} blank specification

HIBC_AZTEC_LIC

 

 

Specifies that the data should be decoded with {@code HIBC LIC Aztec} blank specification

HIBC_DATA_MATRIX_LIC

 

 

Specifies that the data should be decoded with {@code HIBC LIC DataMatrix} blank specification

HIBCQRLIC

 

 

Specifies that the data should be decoded with {@code HIBC LIC QR} blank specification

HIBC_CODE_39_PAS

 

 

Specifies that the data should be decoded with {@code HIBC PAS Code39} blank specification

HIBC_CODE_128_PAS

 

 

Specifies that the data should be decoded with {@code HIBC PAS Code128} blank specification

HIBC_AZTEC_PAS

 

 

Specifies that the data should be decoded with {@code HIBC PAS Aztec} blank specification

HIBC_DATA_MATRIX_PAS

 

 

Specifies that the data should be decoded with {@code HIBC PAS DataMatrix} blank specification

HIBCQRPAS

 

 

Specifies that the data should be decoded with {@code HIBC PAS QR} blank specification

TYPES_1D

 

 

Specifies that data will be checked with all of 1D barcode symbologies

POSTAL_TYPES

 

 

Specifies that data will be checked with all of 1.5D POSTAL barcode symbologies, like Planet, Postnet, AustraliaPost, OneCode, RM4SCC, DutchKIX

MOST_COMMON_TYPES

 

 

Specifies that data will be checked with most commonly used symbologies

TYPES_2D

 

 

Specifies that data will be checked with all of 2D barcode symbologies

ALL_SUPPORTED_TYPES

 

 

Specifies that data will be checked with all available symbologies

javaClassName

 

 

is1D

 

 

Determines if the specified BaseDecodeType contains any 1D barcode symbology

isPostal

 

 

Determines if the specified BaseDecodeType contains any Postal barcode symbology

is2D

 

 

Determines if the specified BaseDecodeType contains any 2D barcode symbology

containsAny

 

 

DotCodeEncodeMode

Encoding mode for DotCode barcodes.


//Auto mode with macros
let codetext = ""[)>\u001E05\u001DCodetextWithMacros05\u001E\u0004"";
let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext);
{
    generator.save("test.bmp", BarCodeImageFormat.BMP);
}

//Auto mode let codetext = "犬Right狗"; let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext); { generator.getParameters().getBarcode().getDotCode().setECIEncoding(ECIEncodings.UTF8); generator.save("test.bmp", BarCodeImageFormat.BMP); }

//Bytes mode let encodedArr = array( 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 ); //encode array to string let codetext = ""; encodedArr.forEach(function(bval, i, bvals) codetext += bval; let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext); { generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(DotCodeEncodeMode.BYTES); generator.save("test.bmp", BarCodeImageFormat.BMP); } //Extended codetext mode //create codetext let textBuilder = new DotCodeExtCodetextBuilder(); textBuilder.addFNC1FormatIdentifier(); textBuilder.addECICodetext(ECIEncodings.Win1251, "Will"); textBuilder.addFNC1FormatIdentifier(); textBuilder.addECICodetext(ECIEncodings.UTF8, "犬Right狗"); textBuilder.addFNC3SymbolSeparator(); textBuilder.addFNC1FormatIdentifier(); textBuilder.addECICodetext(ECIEncodings.UTF16BE, "犬Power狗"); textBuilder.addPlainCodetext("Plain text"); //generate codetext let codetext = textBuilder.getExtendedCodetext(); //generate let generator = new BarcodeGenerator(EncodeTypes.DOT_CODE, codetext); { generator.getParameters().getBarcode().getDotCode().setDotCodeEncodeMode(DotCodeEncodeMode.EXTENDED_CODETEXT); generator.save("test.bmp", BarCodeImageFormat.BMP); }

ECIEncodings

Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. Currently, it is used only for QR 2D barcode.

Example

let generator = new BarcodeGenerator(EncodeTypes.QR);
generator.setCodeText("12345TEXT");
generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.ECI_ENCODING);
generator.getParameters().getBarcode().getQR().setQrEncodeType(QREncodeType.FORCE_QR);
generator.getParameters().getBarcode().getQR().setQrECIEncoding(ECIEncodings.UTF_8);
generator.save("test.png", BarCodeImageFormat.PNG);

Properties

Name Type Optional Description

ISO_8859_1

 

 

ISO/IEC 8859-1 Latin alphabet No. 1 encoding. ECI Id:"\000003"

ISO_8859_2

 

 

ISO/IEC 8859-2 Latin alphabet No. 2 encoding. ECI Id:"\000004"

ISO_8859_3

 

 

ISO/IEC 8859-3 Latin alphabet No. 3 encoding. ECI Id:"\000005"

ISO_8859_4

 

 

ISO/IEC 8859-4 Latin alphabet No. 4 encoding. ECI Id:"\000006"

ISO_8859_5

 

 

ISO/IEC 8859-5 Latin/Cyrillic alphabet encoding. ECI Id:"\000007"

ISO_8859_6

 

 

ISO/IEC 8859-6 Latin/Arabic alphabet encoding. ECI Id:"\000008"

ISO_8859_7

 

 

ISO/IEC 8859-7 Latin/Greek alphabet encoding. ECI Id:"\000009"

ISO_8859_8

 

 

ISO/IEC 8859-8 Latin/Hebrew alphabet encoding. ECI Id:"\000010"

ISO_8859_9

 

 

ISO/IEC 8859-9 Latin alphabet No. 5 encoding. ECI Id:"\000011"

ISO_8859_10

 

 

ISO/IEC 8859-10 Latin alphabet No. 6 encoding. ECI Id:"\000012"

ISO_8859_11

 

 

ISO/IEC 8859-11 Latin/Thai alphabet encoding. ECI Id:"\000013"

ISO_8859_13

 

 

ISO/IEC 8859-13 Latin alphabet No. 7 (Baltic Rim) encoding. ECI Id:"\000015"

ISO_8859_14

 

 

ISO/IEC 8859-14 Latin alphabet No. 8 (Celtic) encoding. ECI Id:"\000016"

ISO_8859_15

 

 

ISO/IEC 8859-15 Latin alphabet No. 9 encoding. ECI Id:"\000017"

ISO_8859_16

 

 

ISO/IEC 8859-16 Latin alphabet No. 10 encoding. ECI Id:"\000018"

Shift_JIS

 

 

Shift JIS (JIS X 0208 Annex 1 + JIS X 0201) encoding. ECI Id:"\000020"

Win1250

 

 

Windows 1250 Latin 2 (Central Europe) encoding. ECI Id:"\000021"

Win1251

 

 

Windows 1251 Cyrillic encoding. ECI Id:"\000022"

Win1252

 

 

Windows 1252 Latin 1 encoding. ECI Id:"\000023"

Win1256

 

 

Windows 1256 Arabic encoding. ECI Id:"\000024"

UTF16BE

 

 

ISO/IEC 10646 UCS-2 (High order byte first) encoding. ECI Id:"\000025"

UTF8

 

 

ISO/IEC 10646 UTF-8 encoding. ECI Id:"\000026"

US_ASCII

 

 

ISO/IEC 646:1991 International Reference Version of ISO 7-bit coded character set encoding. ECI Id:"\000027"

Big5

 

 

Big 5 (Taiwan) Chinese Character Set encoding. ECI Id:"\000028"

GB18030

 

 

GB (PRC) Chinese Character Set encoding. ECI Id:"\000029"

EUC_KR

 

 

Korean Character Set encoding. ECI Id:"\000030"

NONE

 

 

No Extended Channel Interpretation

EnableChecksum

Enable checksum during generation for 1D barcodes.

Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.

Checksum never used: Codabar

Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN

Checksum always used: Rest symbologies

Properties

Name Type Optional Description

DEFAULT

 

 

If checksum is required by the specification - it will be attached.

YES

 

 

Always use checksum if possible.

NO

 

 

Do not use checksum.

EncodeTypes

Specifies the type of barcode to encode.

Properties

Name Type Optional Description

NONE

 

 

Unspecified encode type.

CODABAR

 

 

Specifies that the data should be encoded with CODABAR barcode specification

CODE_11

 

 

Specifies that the data should be encoded with CODE 11 barcode specification

CODE_39_STANDARD

 

 

Specifies that the data should be encoded with Standard CODE 39 barcode specification

CODE_39_EXTENDED

 

 

Specifies that the data should be encoded with Extended CODE 39 barcode specification

CODE_93_STANDARD

 

 

Specifies that the data should be encoded with Standard CODE 93 barcode specification

CODE_93_EXTENDED

 

 

Specifies that the data should be encoded with Extended CODE 93 barcode specification

CODE_128

 

 

Specifies that the data should be encoded with CODE 128 barcode specification

GS_1_CODE_128

 

 

Specifies that the data should be encoded with GS1 Code 128 barcode specification. The codetext must contains parentheses for AI.

EAN_8

 

 

Specifies that the data should be encoded with EAN-8 barcode specification

EAN_13

 

 

Specifies that the data should be encoded with EAN-13 barcode specification

EAN_14

 

 

Specifies that the data should be encoded with EAN14 barcode specification

SCC_14

 

 

Specifies that the data should be encoded with SCC14 barcode specification

SSCC_18

 

 

Specifies that the data should be encoded with SSCC18 barcode specification

UPCA

 

 

Specifies that the data should be encoded with UPC-A barcode specification

UPCE

 

 

Specifies that the data should be encoded with UPC-E barcode specification

ISBN

 

 

Specifies that the data should be encoded with isBN barcode specification

ISSN

 

 

Specifies that the data should be encoded with ISSN barcode specification

ISMN

 

 

Specifies that the data should be encoded with ISMN barcode specification

STANDARD_2_OF_5

 

 

Specifies that the data should be encoded with Standard 2 of 5 barcode specification

INTERLEAVED_2_OF_5

 

 

Specifies that the data should be encoded with INTERLEAVED 2 of 5 barcode specification

MATRIX_2_OF_5

 

 

Represents Matrix 2 of 5 BarCode

ITALIAN_POST_25

 

 

Represents Italian Post 25 barcode.

IATA_2_OF_5

 

 

Represents IATA 2 of 5 barcode.IATA (International Air Transport Assosiation) uses this barcode for the management of air cargo.

ITF_14

 

 

Specifies that the data should be encoded with ITF14 barcode specification

ITF_6

 

 

Represents ITF-6 Barcode.

MSI

 

 

Specifies that the data should be encoded with MSI Plessey barcode specification

VIN

 

 

Represents VIN (Vehicle Identification Number) Barcode.

DEUTSCHE_POST_IDENTCODE

 

 

Represents Deutsch Post barcode, This EncodeType is also known as Identcode,CodeIdentcode,German Postal 2 of 5 Identcode, Deutsch Post AG Identcode, Deutsch Frachtpost Identcode, Deutsch Post AG (DHL)

DEUTSCHE_POST_LEITCODE

 

 

Represents Deutsch Post Leitcode Barcode,also known as German Postal 2 of 5 Leitcode, CodeLeitcode, Leitcode, Deutsch Post AG (DHL).

OPC

 

 

Represents OPC(Optical Product Code) Barcode,also known as , VCA Barcode VCA OPC, Vision Council of America OPC Barcode.

PZN

 

 

Represents PZN barcode.This EncodeType is also known as Pharmacy central number, Pharmazentralnummer

CODE_16_K

 

 

Represents Code 16K barcode.

PHARMACODE

 

 

Represents Pharmacode barcode.

DATA_MATRIX

 

 

2D barcode symbology DataMatrix

QR

 

 

Specifies that the data should be encoded with QR Code barcode specification

AZTEC

 

 

Specifies that the data should be encoded with Aztec barcode specification

PDF_417

 

 

Specifies that the data should be encoded with Pdf417 barcode specification

MACRO_PDF_417

 

 

Specifies that the data should be encoded with MacroPdf417 barcode specification

GS_1_DATA_MATRIX

 

 

2D barcode symbology DataMatrix with GS1 string format

MICRO_PDF_417

 

 

Specifies that the data should be encoded with MicroPdf417 barcode specification

GS_1_QR

 

 

2D barcode symbology QR with GS1 string format

MAXI_CODE

 

 

Specifies that the data should be encoded with MaxiCode barcode specification

DOT_CODE

 

 

Specifies that the data should be encoded with DotCode barcode specification

AUSTRALIA_POST

 

 

Represents Australia Post Customer BarCode

POSTNET

 

 

Specifies that the data should be encoded with Postnet barcode specification

PLANET

 

 

Specifies that the data should be encoded with Planet barcode specification

ONE_CODE

 

 

Specifies that the data should be encoded with USPS OneCode barcode specification

RM_4_SCC

 

 

Represents RM4SCC barcode. RM4SCC (Royal Mail 4-state Customer Code) is used for automated mail sort process in UK.

MAILMARK

 

 

Represents Royal Mail Mailmark barcode.

DATABAR_OMNI_DIRECTIONAL

 

 

Specifies that the data should be encoded with GS1 Databar omni-directional barcode specification.

DATABAR_TRUNCATED

 

 

Specifies that the data should be encoded with GS1 Databar truncated barcode specification.

DATABAR_LIMITED

 

 

Represents GS1 DATABAR limited barcode.

DATABAR_EXPANDED

 

 

Represents GS1 Databar expanded barcode.

DATABAR_EXPANDED_STACKED

 

 

Represents GS1 Databar expanded stacked barcode.

DATABAR_STACKED

 

 

Represents GS1 Databar stacked barcode.

DATABAR_STACKED_OMNI_DIRECTIONAL

 

 

Represents GS1 Databar stacked omni-directional barcode.

SINGAPORE_POST

 

 

Specifies that the data should be encoded with Singapore Post Barcode barcode specification

AUSTRALIAN_POSTE_PARCEL

 

 

Specifies that the data should be encoded with Australian Post Domestic eParcel Barcode barcode specification

SWISS_POST_PARCEL

 

 

Specifies that the data should be encoded with Swiss Post Parcel Barcode barcode specification. Supported types: Domestic Mail, International Mail, Additional Services (new)

PATCH_CODE

 

 

Represents Patch code barcode

CODE_32

 

 

Specifies that the data should be encoded with Code32 barcode specification

DATA_LOGIC_2_OF_5

 

 

Specifies that the data should be encoded with DataLogic 2 of 5 barcode specification

DUTCH_KIX

 

 

Specifies that the data should be encoded with Dutch KIX barcode specification

UPCA_GS_1_CODE_128_COUPON

 

 

Specifies that the data should be encoded with UPC coupon with GS1-128 Extended Code barcode specification. An example of the input string: BarCodeGenerator.setCodetext("514141100906(8102)03"), where UPCA part is "514141100906", GS1Code128 part is (8102)03.

UPCA_GS_1_DATABAR_COUPON

 

 

Specifies that the data should be encoded with UPC coupon with GS1 DataBar addition barcode specification. An example of the input string: BarCodeGenerator.setCodetext("514141100906(8110)106141416543213500110000310123196000"), where UPCA part is "514141100906, DATABAR part is "(8110)106141416543213500110000310123196000". To change the caption, use barCodeBuilder.getCaptionAbove().setText("company prefix + offer code")",

CODABLOCK_F

 

 

Specifies that the data should be encoded with Codablock-F barcode specification.

GS_1_CODABLOCK_F

 

 

Specifies that the data should be encoded with GS1 Codablock-F barcode specification. The codetext must contains parentheses for AI.

GS_1_COMPOSITE_BAR

 

 

Specifies that the data should be encoded with GS1 Composite Bar barcode specification. The codetext must contains parentheses for AI. 1D codetext and 2D codetext must be separated with symbol '/'

HIBC_CODE_39_LIC

 

 

Specifies that the data should be encoded with {@code HIBC LIC Code39Standart} barcode specification.

HIBC_CODE_128_LIC

 

 

Specifies that the data should be encoded with {@code HIBC LIC Code128} barcode specification.

HIBC_AZTEC_LIC

 

 

Specifies that the data should be encoded with {@code HIBC LIC Aztec} barcode specification.

HIBC_DATA_MATRIX_LIC

 

 

Specifies that the data should be encoded with {@code HIBC LIC DataMatrix} barcode specification.

HIBCQRLIC

 

 

Specifies that the data should be encoded with {@code HIBC LIC QR} barcode specification.

HIBC_CODE_39_PAS

 

 

Specifies that the data should be encoded with {@code HIBC PAS Code39Standart} barcode specification.

HIBC_CODE_128_PAS

 

 

Specifies that the data should be encoded with {@code HIBC PAS Code128} barcode specification.

HIBC_AZTEC_PAS

 

 

Specifies that the data should be encoded with {@code HIBC PAS Aztec} barcode specification.

HIBC_DATA_MATRIX_PAS

 

 

Specifies that the data should be encoded with {@code HIBC PAS DataMatrix} barcode specification.

HIBCQRPAS

 

 

Specifies that the data should be encoded with {@code HIBC PAS QR} barcode specification.

GS_1_DOT_CODE

 

 

Specifies that the data should be encoded with {@code GS1 DotCode} barcode specification. The codetext must contains parentheses for AI.

parse

 

 

FontMode

Font size mode.

Properties

Name Type Optional Description

AUTO

 

 

Automatically calculate Font size based on barcode size.

MANUAL

 

 

Use Font sized defined by user.

FontStyle

FontStyle classification

Properties

Name Type Optional Description

BOLD

 

 

ITALIC

 

 

REGULAR

 

 

STRIKEOUT

 

 

UNDERLINE

 

 

GraphicsUnit

Specifies the unit of measure for the given data.

Properties

Name Type Optional Description

WORLD

 

 

Specifies the world coordinate system unit as the unit of measure.

DISPLAY

 

 

Specifies the unit of measure of the display device. Typically pixels for video displays, and 1/100 inch for printers.

PIXEL

 

 

Specifies a device pixel as the unit of measure.

POINT

 

 

Specifies a printer's point = 1/72 inch) as the unit of measure.

INCH

 

 

Specifies the inch as the unit of measure.

DOCUMENT

 

 

Specifies the document unit = 1/300 inch) as the unit of measure.

MILLIMETER

 

 

Specifies the millimeter as the unit of measure.

HIBCLICDateFormat

Specifies the different types of date formats for HIBC LIC.

HIBCPASDataLocation

HIBC PAS data location types.

HIBCPASDataType

HIBC PAS record's data types.

ITF14BorderType

ITF14 barcode's border type

Properties

Name Type Optional Description

NONE

 

 

NO border enclosing the barcode

FRAME

 

 

FRAME enclosing the barcode

BAR

 

 

Tow horizontal bars enclosing the barcode

FRAME_OUT

 

 

FRAME enclosing the barcode

BAR_OUT

 

 

Tow horizontal bars enclosing the barcode

MacroCharacter

Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes. 05 Macro craracter is translated to "[)>\u001E05\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer. 06 Macro craracter is translated to "[)>\u001E06\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.

Properties

Name Type Optional Description

NONE

 

 

None of Macro Characters are added to barcode data

MACRO_05

 

 

05 Macro craracter is added to barcode data in first position. GS1 Data Identifier ISO 15434 Character is translated to "[)>\u001E05\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.

//to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need: let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX, "10123ABC\u001D10123ABC"); generator.getParameters().getBarcode().getDataMatrix().setMacroCharacters(MacroCharacter.MACRO_05); let reader = new BarCodeReader(generator.generateBarCodeImage(BarcodeImageFormat.PNG), DecodeType.GS_1_DATA_MATRIX); reader.readBarCodes().forEach(function(result, i, results) { cosole.log("BarCode CodeText: " + result.getCodeText()); });

MACRO_06

 

 

06 Macro craracter is added to barcode data in first position. ASC MH10 Data Identifier ISO 15434 Character is translated to "[)>\u001E06\u001D" as decoded data header and "\u001E\u0004" as decoded data trailer.

Mailmark2DType

2D Mailmark Type defines size of Data Matrix barcode

Properties

Name Type Optional Description

AUTO

 

 

Auto determine

TYPE_7

 

 

24 x 24 modules

TYPE_9

 

 

32 x 32 modules

TYPE_29

 

 

16 x 48 modules

MaxiCodeEncodeMode

Encoding mode for MaxiCode barcodes.

Example

//Auto mode
let codetext = "犬Right狗";
let generator = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext));
{
    generator.getParameters().getBarcode().getMaxiCode().setECIEncoding(ECIEncodings.UTF8);
    generator.save("test.bmp", BarcodeImageFormat.BMP);
}

//Bytes mode
let encodedArr = [ 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 ];

//encode array to string
let strBld = "";
encodedArr.forEach(function(bval, i, bvals)
{
    strBld += bval;
});
let codetext = strBld;

let generator1 = new BarcodeGenerator(EncodeTypes.MAXI_CODE, codetext))
generator.getParameters().getBarcode().getMaxiCode().setMaxiCodeEncodeMode(MaxiCodeEncodeMode.BYTES);
generator.save("test.bmp", BarcodeImageFormat.BMP);

//Extended codetext mode
//create codetext
let textBuilder = new MaxiCodeExtCodetextBuilder();
textBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
textBuilder.addECICodetext(ECIEncodings.UTF8, "犬Right狗");
textBuilder.addECICodetext(ECIEncodings.UTF16BE, "犬Power狗");
textBuilder.addPlainCodetext("Plain text");

// generate codetext
let codetext = textBuilder.getExtendedCodetext();

//generate
let generator = new BarcodeGenerator(EncodeTypes.MaxiCode, codetext);
generator.getParameters().getBarcode().getMaxiCode().setMaxiCodeEncodeMode(MaxiCodeEncodeMode.EXTENDED_CODETEXT);
generator.getParameters().getBarcode().getMaxiCode().setTwoDDisplayText("My Text");
generator.save("test.bmp", BarcodeImageFormat.BMP);

MaxiCodeMode

Encoding mode for MaxiCode barcodes.

This sample shows how to genereate MaxiCode barcodes using ComplexBarcodeGenerator

Example

//Mode 2 with standart second message
let maxiCodeCodetext = new MaxiCodeCodetextMode2();
maxiCodeCodetext.setPostalCode("524032140");
maxiCodeCodetext.setCountryCode(056);
maxiCodeCodetext.setServiceCategory(999);
let maxiCodeStandartSecondMessage = new MaxiCodeStandartSecondMessage();
maxiCodeStandartSecondMessage.setMessage("Test message");
maxiCodeCodetext.setSecondMessage(maxiCodeStandartSecondMessage);
let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);

//Mode 2 with structured second message
let maxiCodeCodetext = new MaxiCodeCodetextMode2();
maxiCodeCodetext.setPostalCode("524032140");
maxiCodeCodetext.setCountryCode(056);
maxiCodeCodetext.setServiceCategory(999);
let maxiCodeStructuredSecondMessage = new MaxiCodeStructuredSecondMessage();
maxiCodeStructuredSecondMessage.add("634 ALPHA DRIVE");
maxiCodeStructuredSecondMessage.add("PITTSBURGH");
maxiCodeStructuredSecondMessage.add("PA");
maxiCodeStructuredSecondMessage.setYear(99);
maxiCodeCodetext.setSecondMessage(maxiCodeStructuredSecondMessage);
let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);

//Mode 3 with standart second message
let maxiCodeCodetext = new MaxiCodeCodetextMode3();
maxiCodeCodetext.setPostalCode("B1050");
maxiCodeCodetext.setCountryCode(056);
maxiCodeCodetext.setServiceCategory(999);
let maxiCodeStandartSecondMessage = new MaxiCodeStandartSecondMessage();
maxiCodeStandartSecondMessage.setMessage("Test message");
maxiCodeCodetext.setSecondMessage(maxiCodeStandartSecondMessage);
let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext);
complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);

//Mode 3 with structured second message
let maxiCodeCodetext = new MaxiCodeCodetextMode3();
maxiCodeCodetext.setPostalCode("B1050");
maxiCodeCodetext.setCountryCode(056);
maxiCodeCodetext.setServiceCategory(999);
let maxiCodeStructuredSecondMessage = new MaxiCodeStructuredSecondMessage();
maxiCodeStructuredSecondMessage.add("634 ALPHA DRIVE");
maxiCodeStructuredSecondMessage.add("PITTSBURGH");
maxiCodeStructuredSecondMessage.add("PA");
maxiCodeStructuredSecondMessage.setYear(99);
maxiCodeCodetext.setSecondMessage(maxiCodeStructuredSecondMessage);
let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext();
complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);

//Mode 4
let maxiCodeCodetext = new MaxiCodeStandardCodetext();
maxiCodeCodetext.setMode(MaxiCodeMode.MODE_4);
maxiCodeCodetext.setMessage("Test message");
let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext();
complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);

//Mode 5
let maxiCodeCodetext = new MaxiCodeStandardCodetext();
maxiCodeCodetext.setMode(MaxiCodeMode.MODE_5);
maxiCodeCodetext.setMessage("Test message");
let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext())
complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);

//Mode 6
let maxiCodeCodetext = new MaxiCodeStandardCodetext();
maxiCodeCodetext.setMode(MaxiCodeMode.MODE_6);
maxiCodeCodetext.setMessage("Test message");
let complexGenerator = new ComplexBarcodeGenerator(maxiCodeCodetext.getConstructedCodetext();
complexGenerator.generateBarCodeImage(BarcodeImageFormat.PNG);

PatchFormat

PatchCode format. Choose PatchOnly to generate single PatchCode. Use page format to generate Patch page with PatchCodes as borders

Properties

Name Type Optional Description

PATCH_ONLY

 

 

Generates PatchCode only

A4

 

 

Generates A4 format page with PatchCodes as borders and optional QR in the center

A4_LANDSCAPE

 

 

Generates A4 landscape format page with PatchCodes as borders and optional QR in the center

US_LETTER

 

 

Generates US letter format page with PatchCodes as borders and optional QR in the center

US_LETTER_LANDSCAPE

 

 

Generates US letter landscape format page with PatchCodes as borders and optional QR in the center

Pdf417CompactionMode

Pdf417 barcode's compation mode

Properties

Name Type Optional Description

AUTO

 

 

auto detect compation mode

TEXT

 

 

text compaction

NUMERIC

 

 

numeric compaction mode

BINARY

 

 

binary compaction mode

Pdf417ErrorLevel

pdf417 barcode's error correction level, from level 0 to level 9, level 0 means no error correction, level 9 means best error correction

Properties

Name Type Optional Description

LEVEL_0

 

 

level = 0.

LEVEL_1

 

 

level = 1.

LEVEL_2

 

 

level = 2.

LEVEL_3

 

 

level = 3.

LEVEL_4

 

 

level = 4.

LEVEL_5

 

 

level = 5.

LEVEL_6

 

 

level = 6.

LEVEL_7

 

 

level = 7.

LEVEL_8

 

 

level = 8.

Pdf417MacroTerminator

Used to tell the encoder whether to add Macro PDF417 Terminator (codeword 922) to the segment. Applied only for Macro PDF417.

QrBillStandardVersion

SwissQR bill standard version

Property

Name Type Optional Description

V2_0

 

 

Version 2.0

QREncodeMode

Encoding mode for QR barcodes. It is recommended to Use AUTO with CodeTextEncoding = Encoding.UTF8 for latin symbols or digits and UTF_8_BOM for unicode symbols.

Examples

//Example how to use ECI encoding
    let generator = new BarcodeGenerator(EncodeTypes.QR);
    generator.setCodeText("12345TEXT");
    generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.ECI_ENCODING);
    generator.getParameters().getBarcode().getQR().setQrEncodeType(QREncodeType.FORCE_QR);
    generator.getParameters().getBarcode().getQR().setQrECIEncoding(ECIEncodings.UTF8);
    generator.save("test.png", BarcodeImageFormat.PNG);
//Example how to use FNC1 first position in Extended Mode
     QrExtCodetextBuilder textBuilder = new QrExtCodetextBuilder();
     textBuilder.addPlainCodetext("000%89%%0");
     textBuilder.addFNC1GroupSeparator();
     textBuilder.addPlainCodetext("12345<FNC1>");
     //generate barcode
     let generator = new BarcodeGenerator(EncodeTypes.QR);
     generator.setCodeText(textBuilder.getExtendedCodetext());
     generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
     generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
     generator.save("d:/test.png", BarcodeImageFormat.PNG);
// This sample shows how to use FNC1 second position in Extended Mode.
   //create codetext
   QrExtCodetextBuilder textBuilder = new QrExtCodetextBuilder();
   textBuilder.addFNC1SecondPosition("12");
   textBuilder.addPlainCodetext("TRUE3456");
   //generate barcode
   let generator = new BarcodeGenerator(EncodeTypes.QR);
   generator.setCodeText(textBuilder.getExtendedCodetext());
   generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
   generator.save("d:/test.png", BarcodeImageFormat.PNG);

   
//This sample shows how to use multi ECI mode in Extended Mode.
  //create codetext
  QrExtCodetextBuilder textBuilder = new QrExtCodetextBuilder();
  textBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
  textBuilder.addECICodetext(ECIEncodings.UTF8, "Right");
  textBuilder.addECICodetext(ECIEncodings.UTF16BE, "Power");
  textBuilder.addPlainCodetext("t\e\\st");
  //generate barcode
  let generator = new BarcodeGenerator(EncodeTypes.QR);
  generator.setCodeText(textBuilder.getExtendedCodetext());
  generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
  generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
  generator.save("d:/test.png", BarcodeImageFormat.PNG);

Properties

Name Type Optional Description

AUTO

 

 

Encode codetext as is non-unicode charset.
If there is any unicode character,
the codetext will be encoded with value which is set in CodeTextEncoding.

BYTES

 

 

Encode codetext as plain bytes. If it detects any unicode character, the character will be encoded as two bytes, lower byte first.

UTF_8_BOM

 

 

Encode codetext with UTF8 encoding with first ByteOfMark character.

UTF_16_BEBOM

 

 

Encode codetext with UTF8 encoding with first ByteOfMark character. It can be problems with some barcode scaners.

ECI_ENCODING

 

 

Encode codetext with value set in the ECI_ENCODING property. It can be problems with some old (pre 2006) barcode scaners.

EXTENDED_CODETEXT

 

 

Extended Channel mode which supports FNC1 first position, FNC1 second position and multi ECI modes.

It is better to use QrExtCodetextBuilder for extended codetext generation.

Use Display2DText property to set visible text to removing managing characters.

Encoding Principles:

All symbols "\" must be doubled "\\" in the codetext.

FNC1 in first position is set in codetext as as "<FNC1>"

FNC1 in second position is set in codetext as as "<FNC1(value)>". The value must be single symbols (a-z, A-Z) or digits from 0 to 99.

Group Separator for FNC1 modes is set as 0x1D character '\\u001D'

If you need to insert "<FNC1>" string into barcode write it as "<\FNC1>"

ECI identifiers are set as single slash and six digits identifier "\000026" - UTF8 ECI identifier

TO disable current ECI mode and convert to default JIS8 mode zero mode ECI indetifier is set. "\000000"

All unicode characters after ECI identifier are automatically encoded into correct character codeset.

QREncodeType

QR / MicroQR selector mode. Select FORCE_QR for standard QR symbols, AUTO for MicroQR. FORCE_MICRO_QR is used for strongly MicroQR symbol generation if it is possible.

Properties

Name Type Optional Description

AUTO

 

 

Mode starts barcode version negotiation from MicroQR V1

FORCE_QR

 

 

Mode starts barcode version negotiation from QR V1

FORCE_MICRO_QR

 

 

Mode starts barcode version negotiation from from MicroQR V1 to V4. If data cannot be encoded into MicroQR, exception is thrown.

QRErrorLevel

Level of Reed-Solomon error correction. From low to high: LEVEL_L, LEVEL_M, LEVEL_Q, LEVEL_H.

Properties

Name Type Optional Description

LEVEL_L

 

 

Allows recovery of 7% of the code text

LEVEL_M

 

 

Allows recovery of 15% of the code text

LEVEL_Q

 

 

Allows recovery of 25% of the code text

LEVEL_H

 

 

Allows recovery of 30% of the code text

QRVersion

Version of QR Code. From Version1 to Version40 for QR code and from M1 to M4 for MicroQr.

Properties

Name Type Optional Description

AUTO

 

 

Specifies to automatically pick up the best version for QR. This is default value.

VERSION_01

 

 

Specifies version 1 with 21 x 21 modules.

VERSION_02

 

 

Specifies version 2 with 25 x 25 modules.

VERSION_03

 

 

Specifies version 3 with 29 x 29 modules.

VERSION_04

 

 

Specifies version 4 with 33 x 33 modules.

VERSION_05

 

 

Specifies version 5 with 37 x 37 modules.

VERSION_06

 

 

Specifies version 6 with 41 x 41 modules.

VERSION_07

 

 

Specifies version 7 with 45 x 45 modules.

VERSION_08

 

 

Specifies version 8 with 49 x 49 modules.

VERSION_09

 

 

Specifies version 9 with 53 x 53 modules.

VERSION_10

 

 

Specifies version 10 with 57 x 57 modules.

VERSION_11

 

 

Specifies version 11 with 61 x 61 modules.

VERSION_12

 

 

Specifies version 12 with 65 x 65 modules.

VERSION_13

 

 

Specifies version 13 with 69 x 69 modules.

VERSION_14

 

 

Specifies version 14 with 73 x 73 modules.

VERSION_15

 

 

Specifies version 15 with 77 x 77 modules.

VERSION_16

 

 

Specifies version 16 with 81 x 81 modules.

VERSION_17

 

 

Specifies version 17 with 85 x 85 modules.

VERSION_18

 

 

Specifies version 18 with 89 x 89 modules.

VERSION_19

 

 

Specifies version 19 with 93 x 93 modules.

VERSION_20

 

 

Specifies version 20 with 97 x 97 modules.

VERSION_21

 

 

Specifies version 21 with 101 x 101 modules.

VERSION_22

 

 

Specifies version 22 with 105 x 105 modules.

VERSION_23

 

 

Specifies version 23 with 109 x 109 modules.

VERSION_24

 

 

Specifies version 24 with 113 x 113 modules.

VERSION_25

 

 

Specifies version 25 with 117 x 117 modules.

VERSION_26

 

 

Specifies version 26 with 121 x 121 modules.

VERSION_27

 

 

Specifies version 27 with 125 x 125 modules.

VERSION_28

 

 

Specifies version 28 with 129 x 129 modules.

VERSION_29

 

 

Specifies version 29 with 133 x 133 modules.

VERSION_30

 

 

Specifies version 30 with 137 x 137 modules.

VERSION_31

 

 

Specifies version 31 with 141 x 141 modules.

VERSION_32

 

 

Specifies version 32 with 145 x 145 modules.

VERSION_33

 

 

Specifies version 33 with 149 x 149 modules.

VERSION_34

 

 

Specifies version 34 with 153 x 153 modules.

VERSION_35

 

 

Specifies version 35 with 157 x 157 modules.

VERSION_36

 

 

Specifies version 36 with 161 x 161 modules.

VERSION_37

 

 

Specifies version 37 with 165 x 165 modules.

VERSION_38

 

 

Specifies version 38 with 169 x 169 modules.

VERSION_39

 

 

Specifies version 39 with 173 x 173 modules.

VERSION_40

 

 

Specifies version 40 with 177 x 177 modules.

VERSION_M1

 

 

Specifies version M1 for Micro QR with 11 x 11 modules.

VERSION_M2

 

 

Specifies version M2 for Micro QR with 13 x 13 modules.

VERSION_M3

 

 

Specifies version M3 for Micro QR with 15 x 15 modules.

VERSION_M4

 

 

Specifies version M4 for Micro QR with 17 x 17 modules.

TextAlignment

Text alignment.

Properties

Name Type Optional Description

LEFT

 

 

Left position.

CENTER

 

 

Center position.

RIGHT

 

 

Right position.