Members
AddressType
Properties:
Name | Type | Description |
---|---|---|
UNDETERMINED |
Undetermined | |
STRUCTURED |
Structured address | |
COMBINED_ELEMENTS |
Combined address elements | |
CONFLICTING |
Conflicting |
- Source:
AutoSizeMode
Default value is AutoSizeMode.NONE.
Properties:
Name | Type | 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. |
- Source:
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);
AztecEncodeMode
Encoding mode for Aztec barcodes.
- Source:
Examples
//Auto mode
let codetext = "犬Right狗";
let generator = new BarcodeGenerator(EncodeTypes.AZTEC, codetext);
generator.getParameters().getBarcode().getAztec().setECIEncoding(ECIEncodings.UTF_8);
generator.save("test.bmp");
//Bytes mode
let encodedArr = [ 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 ];
//encode array to string
let strBld = "";
for(let i = 0; i < encodedArr; i++)
{
byte bval = encodedArr[i]
strBld.append(String.fromCharCode(bval));
}
let codetext = strBld;
let generator = new BarcodeGenerator(EncodeTypes.AZTEC, codetext);
generator.getParameters().getBarcode().getAztec().setAztecEncodeMode(AztecEncodeMode.BYTES);
generator.save("test.bmp", BarcodeImageFormat.PNG);
//Extended codetext mode
//create codetext
let textBuilder = new AztecExtCodetextBuilder();
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.AZTEC, codetext);
generator.getParameters().getBarcode().getAztec().setAztecEncodeMode(AztecEncodeMode.EXTENDED_CODETEXT);
generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
generator.save("test.bmp", BarcodeImageFormat.PNG);
</pre>
</pre></blockquote></hr></p>
AztecSymbolMode
Properties:
Name | Type | 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. |
- Source:
Example
let generator = new BarcodeGenerator(EncodeTypes.AZTEC);
generator.setCodeText("125");
generator.getParameters().getBarcode().getAztec().setAztecSymbolMode(AztecSymbolMode.RUNE);
generator.save("test.png", BarCodeImageFormat.PNG);
BarCodeConfidence
Properties:
Name | Type | 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 |
- Source:
Examples
//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, 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, 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());
});
BarCodeImageFormat
Properties:
Name | Type | 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. |
- Source:
BarcodeClassifications
Properties:
Name | Type | 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 |
- Source:
BarcodeQualityMode
Mode which enables methods to recognize barcode elements with the selected quality. Barcode element with lower quality requires more hard methods which slows the recognition.
This sample shows how to use BarcodeQuality modelet reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_FULL_ASCII, DecodeType.CODE_128]); reader.getQualitySettings().setBarcodeQuality(BarcodeQualityMode.LOW); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode CodeText: " + result.getCodeText()); });
- Source:
BorderDashStyle
Properties:
Name | Type | 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. |
- Source:
ChecksumValidation
- Source:
CodabarChecksumMode
Properties:
Name | Type | Description |
---|---|---|
MOD_10 |
Specifies Mod 10 algorithm for Codabar. | |
MOD_16 |
Specifies Mod 16 algorithm for Codabar (recomended AIIM). |
- Source:
CodabarSymbol
Properties:
Name | Type | 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. |
- Source:
Code128EncodeMode
Encoding mode for Code128 barcodes. {@code Code 128} specification.
Thos code demonstrates how to generate code 128 with different encodings//Generate code 128 with ISO 15417 encoding let generator = new BarcodeGenerator(EncodeTypes.CODE_128, "ABCD1234567890"); generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Code128EncodeMode.AUTO); generator.save("d:\\code128Auto.png", BarCodeImageFormat.PNG); //Generate code 128 only with Codeset A encoding let generator = new BarcodeGenerator(EncodeTypes.CODE_128, "ABCD1234567890"); generator.getParameters().getBarcode().getCode128().setCode128EncodeMode(Code128EncodeMode.CODE_A); generator.save("d:\\code128CodeA.png", BarCodeImageFormat.PNG);
- Source:
Code128SubType
Properties:
Name | Type | 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 /// |
- Source:
CodeLocation
Properties:
Name | Type | Description |
---|---|---|
BELOW |
Codetext below barcode. | |
ABOVE |
Codetext above barcode. | |
NONE |
Hide codetext. |
- Source:
ComplexBackgroundMode
Mode which enables or disables additional recognition of color barcodes on color images.
This sample shows how to use ComplexBackground modelet reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_FULL_ASCII, DecodeType.CODE_128]); reader.getQualitySettings().setComplexBackground(ComplexBackgroundMode.ENABLED); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode CodeText: " + result.getCodeText()); });
- Source:
CustomerInformationInterpretingType
Properties:
Name | Type | 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. |
- Source:
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());
});
DataMatrixEccType
Properties:
Name | Type | 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. |
- Source:
DataMatrixEncodeMode
DataMatrix encoder's encoding mode, default to Auto
This sample shows how to do codetext in Extended Mode.//Auto mode let codetext = "犬Right狗"; let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX, codetext); generator.getParameters().getBarcode().getDataMatrix().setECIEncoding(ECIEncodings.UTF8); generator.save("test.bmp", BarcodeImageFormat.PNG); //Bytes mode let encodedArr = [ 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9 ]; let generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX, encodedArr); generator.getParameters().getBarcode().getDataMatrix().setDataMatrixEncodeMode(DataMatrixEncodeMode.BINARY); generator.save("test.bmp", BarcodeImageFormat.PNG); //Extended codetext mode //create codetext let codetextBuilder=new DataMatrixExtCodetextBuilder(); codetextBuilder.addECICodetextWithEncodeMode(ECIEncodings.Win1251,DataMatrixEncodeMode.BYTES,"World"); codetextBuilder.addPlainCodetext("Will"); codetextBuilder.addECICodetext(ECIEncodings.UTF8,"犬Right狗"); codetextBuilder.addCodetextWithEncodeMode(DataMatrixEncodeMode.C40,"ABCDE"); //generate codetext let codetext=codetextBuilder.getExtended(); //generate let generator=new BarcodeGenerator(EncodeTypes.DATA_MATRIX,codetext); generator.getParameters().getBarcode().getDataMatrix().setDataMatrixEncodeMode(DataMatrixEncodeMode.EXTENDED_CODETEXT); generator.save("test.bmp", BarcodeImageFormat.PNG);
- Source:
DataMatrixVersion
Specify the type of the ECC to encode.
- Source:
DecodeType
Properties:
Name | Type | 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 |
Specifies that the data should be decoded with {@code Code 39} basic charset barcode specification: ISO/IEC 16388 |
|
CODE_39_FULL_ASCII |
Specifies that the data should be decoded with {@code Code 39} full ASCII charset barcode specification: ISO/IEC 16388 |
|
CODE_93 |
Specifies that the data should be decoded with {@code 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 | |
GS_1_AZTEC |
Specifies that the data should be decoded with {@code GS1 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 | |
GS_1_MICRO_PDF_417 |
Specifies that the data should be decoded with 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 | |
RECT_MICRO_QR |
Specifies that the data should be decoded with RectMicroQR (rMQR) 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 |
|
HAN_XIN |
Specifies that the data should be decoded with Han Xin Code blank specification | |
GS_1_HAN_XIN |
Specifies that the data should be decoded with Han Xin Code blank specification | |
GS_1_COMPOSITE_BAR |
Specifies that the data should be decoded with {@code GS1 Composite Bar} barcode 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 |
- Source:
Example
//This sample shows how to detect Code39 and Code128 barcodes.
let reader = new BarCodeReader("test.png", null, [ DecodeType.CODE_39, DecodeType.CODE_128 ]);
reader.readBarCodes().forEach(function(result, i, results)
{
console.log("BarCode Type: " + result.getCodeTypeName());
console.log("BarCode CodeText: " + result.getCodeText());
});
DeconvolutionMode
Deconvolution (image restorations) mode which defines level of image degradation. Originally deconvolution is a function which can restore image degraded (convoluted) by any natural function like blur, during obtaining image by camera. Because we cannot detect image function which corrupt the image, we have to check most well know functions like sharp or mathematical morphology.
This sample shows how to use Deconvolution modelet reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_FULL_ASCII, DecodeType.CODE_128]); reader.getQualitySettings().setDeconvolution(DeconvolutionMode.SLOW); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode CodeText: " + result.getCodeText()); });
- Source:
DotCodeEncodeMode
- Source:
Examples
//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
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.
Properties:
Name | Type | 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" | |
GB2312 |
GB (PRC) Chinese Character Set encoding. ECI Id:"\000029" | |
EUC_KR |
Korean Character Set encoding. ECI Id:"\000030" | |
GBK |
GBK (extension of GB2312 for Simplified Chinese) encoding. ECI Id:"\000031" |
|
GB18030 |
GGB18030 Chinese Character Set encoding. ECI Id:"\000032" |
|
UTF16LE |
ISO/IEC 10646 UTF-16LE encoding. ECI Id:"\000033" |
|
UTF32BE |
ISO/IEC 10646 UTF-32BE encoding. ECI Id:"\000034" |
|
UTF32LE |
ISO/IEC 10646 UTF-32LE encoding. ECI Id:"\000035" |
|
INVARIANT |
ISO/IEC 646: ISO 7-bit coded character set - Invariant Characters set encoding. ECI Id:"\000170" |
|
BINARY |
8-bit binary data. ECI Id:"\000899" |
|
NONE |
No Extended Channel Interpretation |
- Source:
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);
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 | Description |
---|---|---|
DEFAULT |
If checksum is required by the specification - it will be attached. |
|
YES |
Always use checksum if possible. |
|
NO |
Do not use checksum. |
- Source:
EncodeTypes
Properties:
Name | Type | 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 |
Specifies that the data should be encoded with {@code Code 39} basic charset barcode specification: ISO/IEC 16388 |
|
CODE_39_FULL_ASCII |
Specifies that the data should be encoded with {@code Code 39} full ASCII charset barcode specification: ISO/IEC 16388 |
|
CODE_93 |
Specifies that the data should be encoded with {@code 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 | |
GS_1_AZTEC |
Specifies that the data should be encoded with {@code GS1 Aztec} barcode specification. The codetext must contains parentheses for AI. |
|
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_MICRO_PDF_417 |
Specifies that the data should be encoded with GS1MicroPdf417 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. |
|
UPCA_GS_1_DATABAR_COUPON |
Specifies that the data should be encoded with UPC coupon with GS1 DataBar addition barcode specification. |
|
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. |
|
HAN_XIN |
Specifies that the data should be encoded with Han Xin barcode specification | |
GS_1_HAN_XIN |
2D barcode symbology QR with GS1 string format | |
MICRO_QR |
Specifies that the data should be encoded with MicroQR Code barcode specification | |
RECT_MICRO_QR |
Specifies that the data should be encoded with RectMicroQR (rMQR) Code barcode specification | |
parse |
- Source:
FontMode
Properties:
Name | Type | Description |
---|---|---|
AUTO |
Automatically calculate Font size based on barcode size. | |
MANUAL |
Use Font sized defined by user. |
- Source:
FontStyle
Properties:
Name | Type | Description |
---|---|---|
BOLD |
Bold text | |
ITALIC |
Italic text | |
REGULAR |
Normal text | |
STRIKEOUT |
Text with a line through the middle. | |
UNDERLINE |
Underlined text. |
- Source:
GraphicsUnit
Properties:
Name | Type | 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. |
- Source:
HIBCLICDateFormat
Specifies the different types of date formats for HIBC LIC.
- Source:
HIBCPASDataLocation
HIBC PAS data location types.
- Source:
HIBCPASDataType
HIBC PAS record's data types.
- Source:
HanXinEncodeMode
Han Xin Code encoding mode. It is recommended to use Auto with ASCII / Chinese characters or Unicode for Unicode characters.
- Source:
Examples
// Auto mode
let codetext = "1234567890ABCDEFGabcdefg,Han Xin Code";
let generator = new BarcodeGenerator(EncodeTypes.HAN_XIN, codetext);
generator.save("test.bmp", BarcodeImageFormat.BMP);
// Bytes mode
let encodedArr = [0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9];
//encode array to string
let codetext = "";
for (int i = 0; i <encodedArr.length; i++)
{
let bval = String.fromCharCode(encodedArr[i]);
codetext += bval;
}
let generator = new BarcodeGenerator(EncodeTypes.HAN_XIN, codetext);
generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(HanXinEncodeMode.BYTES);
generator.save("test.bmp", BarcodeImageFormat.BMP);
// ECI mode
let codetext = "ΑΒΓΔΕ";
let generator = new BarcodeGenerator(EncodeTypes.HAN_XIN, codetext);
generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(HanXinEncodeMode.ECI);
generator.getParameters().getBarcode().getHanXin().setHanXinECIEncoding(ECIEncodings.ISO_8859_7);
generator.save("test.bmp", BarcodeImageFormat.BMP);
// URI mode
let codetext = "https://www.test.com/%BC%DE%%%ab/search=test";
generator = new BarcodeGenerator(EncodeTypes.HAN_XIN, codetext);
generator.getParameters().getBarcode().getHanXin().setHanXinEncodeMode(HanXinEncodeMode.URI);
generator.save("test.bmp", BarcodeImageFormat.BMP);
// Extended mode - TBD
</pre>
</pre></blockquote></hr></p>
HanXinErrorLevel
Level of Reed-Solomon error correction. From low to high: L1, L2, L3, L4.
- Source:
HanXinVersion
Version of Han Xin Code. From Version01 - 23 x 23 modules to Version84 - 189 x 189 modules, increasing in steps of 2 modules per side.
- Source:
ITF14BorderType
Properties:
Name | Type | 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 |
- Source:
InverseImageMode
Mode which enables or disables additional recognition of barcodes on images with inverted colors (luminance).
This sample shows how to use InverseImage modelet reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_FULL_ASCII, DecodeType.CODE_128]); reader.getQualitySettings().setInverseImage(InverseImageMode.ENABLED); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode CodeText: " + result.getCodeText()); });
- Source:
MacroCharacter
hese samples show how to encode Macro Characters in MicroPdf417 and DataMatrix
- Source:
Examples
# 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), null, DecodeType.GS1DataMatrix);
reader.readBarCodes().forEach(function(result, i, results)
{
console.log("BarCode CodeText: " + result.getCodeText());
});
# Encodes MicroPdf417 with 05 Macro the string: "[)>\u001E05\u001Dabcde1234\u001E\u0004"
let generator = new BarcodeGenerator(EncodeTypes.MicroPdf417, "abcde1234");
generator.getParameters().getBarcode().getPdf417().setMacroCharacters(MacroCharacter.MACRO_05);
let reader = new BarCodeReader(generator.generateBarCodeImage(BarcodeImageFormat.PNG), null, DecodeType.MICRO_PDF_417);
reader.readBarCodes().forEach(function(result, i, results)
{
console.log( result.getCodeText());
});
# Encodes MicroPdf417 with 06 Macro the string: "[)>\u001E06\u001Dabcde1234\u001E\u0004"
let generator = new BarcodeGenerator(EncodeTypes.MicroPdf417, "abcde1234");
generator.getParameters().getBarcode().getPdf417().setMacroCharacters(MacroCharacter.MACRO_06);
let reader = new BarCodeReader(generator.generateBarCodeImage(BarcodeImageFormat.PNG), null, DecodeType.MICRO_PDF_417);
reader.readBarCodes().forEach(function(result, i, results)
{
console.log( result.getCodeText());
});
</pre>
</pre>
Mailmark2DType
Properties:
Name | Type | Description |
---|---|---|
AUTO |
Auto determine | |
TYPE_7 |
24 x 24 modules | |
TYPE_9 |
32 x 32 modules | |
TYPE_29 |
16 x 48 modules |
- Source:
MaxiCodeEncodeMode
- Source:
Examples
//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 generator = 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
- Source:
Examples
This sample shows how to genereate MaxiCode barcodes using ComplexBarcodeGenerator
//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);
MicroQRVersion
Properties:
Name | Type | Description |
---|---|---|
AUTO |
Specifies to automatically pick up the best version for MicroQR. This is default value. | |
M1 |
Specifies version M1 for Micro QR with 11 x 11 modules. |
|
M2 |
Specifies version M2 for Micro QR with 13 x 13 modules. |
|
M3 |
Specifies version M3 for Micro QR with 15 x 15 modules. |
|
M4 |
Specifies version M4 for Micro QR with 17 x 17 modules. |
- Source:
PatchFormat
Properties:
Name | Type | 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 |
- Source:
Pdf417CompactionMode
Properties:
Name | Type | Description |
---|---|---|
AUTO |
auto detect compation mode | |
TEXT |
text compaction | |
NUMERIC |
numeric compaction mode | |
BINARY |
binary compaction mode |
- Source:
Pdf417EncodeMode
- Source:
Pdf417ErrorLevel
Properties:
Name | Type | 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. |
- Source:
Pdf417MacroTerminator
- Source:
QREncodeMode
Encoding mode for QR barcodes.
Example how to use ECI encodinggenerator = new BarcodeGenerator(EncodeTypes.QR, "12345TEXT"); generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.ECI_ENCODING); generator.getParameters().getBarcode().getQR().setQrECIEncoding(ECIEncodings.UTF8); generator.save("test.png", BarcodeImageFormat.PNG);
Example how to use FNC1 first position in Extended ModetextBuilder = new QrExtCodetextBuilder(); textBuilder.addPlainCodetext("000%89%%0"); textBuilder.addFNC1GroupSeparator(); textBuilder.addPlainCodetext("12345<FNC1>"); //generate barcode generator = new BarcodeGenerator(EncodeTypes.QR); generator.setCodeText(textBuilder.getExtended()); 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 textBuilder = new QrExtCodetextBuilder(); textBuilder.addFNC1SecondPosition("12"); textBuilder.addPlainCodetext("TRUE3456"); //generate barcode generator = new BarcodeGenerator(EncodeTypes.QR); generator.setCodeText(textBuilder.getExtended()); 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 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 generator = new BarcodeGenerator(EncodeTypes.QR); generator.setCodeText(textBuilder.getExtended()); generator.getParameters().getBarcode().getQR().setQrEncodeMode(QREncodeMode.EXTENDED_CODETEXT); generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text"); generator.save("d:/test.png", BarcodeImageFormat.PNG);
- Source:
QREncodeType
FORCE_MICRO_QR is used for strongly MicroQR symbol generation if it is possible.
Properties:
Name | Type | 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. |
- Source:
QRErrorLevel
Properties:
Name | Type | 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 |
- Source:
QRVersion
Properties:
Name | Type | 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. |
- Source:
QrBillStandardVersion
Properties:
Name | Type | Description |
---|---|---|
V2_0 |
Version 2.0 |
- Source:
RectMicroQRVersion
Version of RectMicroQR Code. From version R7x43 to version R17x139.
Properties:
Name | Type | Description |
---|---|---|
AUTO |
Specifies to automatically pick up the best version for RectMicroQR. This is default value. |
|
R7x43 |
Specifies version with 7 x 43 modules. |
|
R7x59 |
Specifies version with 7 x 59 modules. |
|
R7x77 |
Specifies version with 7 x 77 modules. |
|
R7x99 |
Specifies version with 7 x 99 modules. |
|
R7x139 |
Specifies version with 7 x 139 modules. |
|
R9x43 |
Specifies version with 9 x 43 modules. |
|
R9x59 |
Specifies version with 9 x 59 modules. |
|
R9x77 |
Specifies version with 9 x 77 modules. |
|
R9x99 |
Specifies version with 9 x 99 modules. |
|
R9x139 |
Specifies version with 9 x 139 modules. |
|
R11x27 |
Specifies version with 11 x 27 modules. |
|
R11x43 |
Specifies version with 11 x 43 modules. |
|
R11x59 |
Specifies version with 11 x 59 modules. |
|
R11x77 |
Specifies version with 11 x 77 modules. |
|
R11x99 |
Specifies version with 11 x 99 modules. |
|
R11x139 |
Specifies version with 11 x 139 modules. |
|
R13x27 |
Specifies version with 13 x 27 modules. |
|
R13x43 |
Specifies version with 13 x 43 modules. |
|
R13x59 |
Specifies version with 13 x 59 modules. |
|
R13x77 |
Specifies version with 13 x 77 modules. |
|
R13x99 |
Specifies version with 13 x 99 modules. |
|
R13x139 |
Specifies version with 13 x 139 modules. |
|
R15x43 |
Specifies version with 15 x 43 modules. |
|
R15x59 |
Specifies version with 15 x 59 modules. |
|
R15x77 |
Specifies version with 15 x 77 modules. |
|
R15x99 |
Specifies version with 15 x 99 modules. |
|
R15x139 |
Specifies version with 15 x 139 modules. |
|
R17x43 |
Specifies version with 17 x 43 modules. |
|
R17x59 |
Specifies version with 17 x 59 modules. |
|
R17x77 |
Specifies version with 17 x 77 modules. |
|
R17x99 |
Specifies version with 17 x 99 modules. |
|
R17x139 |
Specifies version with 17 x 139 modules. |
- Source:
SvgColorMode
Possible modes for filling color in svg file, RGB is default and supported by SVG 1.1. RGBA, HSL, HSLA is allowed in SVG 2.0 standard. Even in RGB opacity will be set through "fill-opacity" parameter
- Source:
TextAlignment
Properties:
Name | Type | Description |
---|---|---|
LEFT |
Left position. | |
CENTER |
Center position. | |
RIGHT |
Right position. |
- Source:
TwoDComponentType
- Source:
Example
let codetext = "(01)03212345678906/(21)A1B2C3D4E5F6G7H8";
let generator = new BarcodeGenerator(EncodeTypes.GS1_COMPOSITE_BAR, codetext))
generator.getParameters().getBarcode().getGS1CompositeBar().setLinearComponentType(EncodeTypes.GS1_CODE_128);
generator.getParameters().getBarcode().getGS1CompositeBar().setTwoDComponentType(TwoDComponentType.CC_A);
// Aspect ratio of 2D component
generator.getParameters().getBarcode().getPdf417().setAspectRatio(3);
///
// X-Dimension of 1D and 2D components
generator.getParameters().getBarcode().getXDimension().setPixels(3);
///
// Height of 1D component
generator.getParameters().getBarcode().getBarHeight().setPixels(100);
///
generator.save("test.png", BarcodeImageFormat.PNG);
XDimensionMode
Recognition mode which sets size (from 1 to infinity) of barcode minimal element: matrix cell or bar.
This sample shows how to use XDimension modelet reader = new BarCodeReader("test.png", null, [DecodeType.CODE_39_FULL_ASCII, DecodeType.CODE_128]); reader.getQualitySettings().setXDimension(XDimensionMode.SMALL); reader.readBarCodes().forEach(function(result, i, results) { console.log("BarCode CodeText: " + result.getCodeText()); });
- Source: