QrExtCodetextBuilder

QrExtCodetextBuilder

Extended codetext generator for 2D QR barcodes for ExtendedCodetext Mode of QREncodeMode

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

Constructor

new QrExtCodetextBuilder()

Source:
Examples
//Example how to generate FNC1 first position for Extended Mode
 //create codetext
 const lTextBuilder = new QrExtCodetextBuilder();
 lTextBuilder.addFNC1FirstPosition();
 lTextBuilder.addPlainCodetext("000%89%%0");
 lTextBuilder.addFNC1GroupSeparator();
 lTextBuilder.addPlainCodetext("12345<FNC1>");
 //generate codetext
 const lCodetext = lTextBuilder.getExtendedCodetext();
//Example how to generate FNC1 second position for Extended Mode
 //create codetext
const lTextBuilder = new QrExtCodetextBuilder();
lTextBuilder.addFNC1SecondPosition("12");
lTextBuilder.addPlainCodetext("TRUE3456");
//generate codetext
const lCodetext = lTextBuilder.getExtendedCodetext();

 
//Example how to generate multi ECI mode for Extended Mode
//create codetext
const lTextBuilder = new QrExtCodetextBuilder();
lTextBuilder.addECICodetext(ECIEncodings.Win1251, "Will");
lTextBuilder.addECICodetext(ECIEncodings.UTF8, "Right");
lTextBuilder.addECICodetext(ECIEncodings.UTF16BE, "Power");
lTextBuilder.addPlainCodetext("t\\e\\\\st");
//generate codetext
const lCodetext = lTextBuilder.getExtendedCodetext();

Methods

addCodetextWithCompactionMode(mode, codetext)

Adds codetext with the specified QR compaction mode to the extended codetext items.

Parameters:
Name Type Description
mode QR compaction mode for the codetext.
codetext Codetext in Unicode to add as an extended codetext item.
Source:
Throws:
IllegalArgumentException The specified codetext cannot be encoded in the selected QR compaction mode.

addFNC1FirstPosition()

Adds FNC1 in first position to the extended codetext items

Source:

addFNC1GroupSeparator()

Adds Group Separator (GS - '\\u001D') to the extended codetext items

Source:

addFNC1SecondPosition(codetext)

Adds FNC1 in second position to the extended codetext items

Parameters:
Name Type Description
codetext Value of the FNC1 in the second position
Source:

clear()

Clears extended codetext items

Source:

getExtendedCodetext()

Generates Extended codetext from the extended codetext list.

Returns:
Type Description
Extended codetext as string
Source: