public class QrExtCodetextBuilder extends ExtCodetextBuilder
Extended codetext generator for 2D QR barcodes for ExtendedCodetext Mode of EncodeMode
Use TwoDDisplayText property of BarcodeGenerator to set visible text to removing managing characters.
This sample shows how to use FNC1 first position in Extended Mode.
[C#]
//create codetext
QrExtCodetextBuilder TextBuilder = new QrExtCodetextBuilder();
TextBuilder.AddFNC1FirstPosition();
TextBuilder.AddPlainCodetext("000%89%%0");
TextBuilder.AddFNC1GroupSeparator();
TextBuilder.AddPlainCodetext("12345<FNC1>");
//generate codetext
String codetext = TextBuilder.GetExtendedCodetext();
//generate
using(BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR))
{
generator.Parameters.Barcode.QR.EncodeMode = QREncodeMode.ExtendedCodetext;
generator.Parameters.Barcode.QR.ErrorLevel = QRErrorLevel.LevelL;
generator.CodeText = codetext;
generator.Parameters.Barcode.CodeTextParameters.TwoDDisplayText = "My Text";
generator.Save("test.bmp");
}
This sample shows how to use FNC1 second position in Extended Mode.
[C#]
//create codetext
QrExtCodetextBuilder TextBuilder = new QrExtCodetextBuilder();
TextBuilder.AddFNC1SecondPosition("12");
TextBuilder.AddPlainCodetext("TRUE3456");
//generate codetext
String codetext = TextBuilder.GetExtendedCodetext();
//generate
using(BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR))
{
generator.Parameters.Barcode.QR.EncodeMode = QREncodeMode.ExtendedCodetext;
generator.Parameters.Barcode.QR.ErrorLevel = QRErrorLevel.LevelL;
generator.CodeText = codetext;
generator.Parameters.Barcode.CodeTextParameters.TwoDDisplayText = "My Text";
generator.Save("test.bmp");
}
This sample shows how to use multi ECI mode in Extended Mode.
[C#]
//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");
TextBuilder.AddCodetextWithCompactionMode(QrExtCompactionMode.AlphaNumeric, @"ASPOSE2001");
TextBuilder.AddCodetextWithCompactionMode(QrExtCompactionMode.Numeric, @"20012026");
//generate codetext
String codetext = TextBuilder.GetExtendedCodetext();
//generate
using(BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR))
{
generator.Parameters.Barcode.QR.EncodeMode = QREncodeMode.ExtendedCodetext;
generator.Parameters.Barcode.QR.ErrorLevel = QRErrorLevel.LevelL;
generator.CodeText = codetext;
generator.Parameters.Barcode.CodeTextParameters.TwoDDisplayText = "My Text";
generator.Save("test.bmp");
}
| Constructor and Description |
|---|
QrExtCodetextBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCodetextWithCompactionMode(QrExtCompactionMode mode,
java.lang.String codetext)
Adds codetext with the specified QR compaction mode to the extended codetext items.
|
void |
addFNC1FirstPosition()
Sets FNC1 in first position.
|
void |
addFNC1GroupSeparator()
Adds Group Separator (GS - '\\u001D') to the extended codetext items
|
void |
addFNC1SecondPosition(java.lang.String codetext)
Sets FNC1 in second position.
|
void |
clear()
Clears extended codetext items
|
java.lang.String |
getExtendedCodetext()
Generates Extended codetext from the extended codetext list.
|
addECICodetext, addPlainCodetextpublic void clear()
Clears extended codetext items
clear in class ExtCodetextBuilderpublic final void addFNC1FirstPosition()
Sets FNC1 in first position. If another FNC1 mode was set before, it is replaced.
public final void addFNC1SecondPosition(java.lang.String codetext)
Sets FNC1 in second position. If another FNC1 mode was set before, it is replaced.
codetext - Value of the FNC1 in the second position. The value must be a single letter from a-z or A-Z, or a two-digit number from 00 to 99.public final void addFNC1GroupSeparator()
Adds Group Separator (GS - '\\u001D') to the extended codetext items
public final void addCodetextWithCompactionMode(QrExtCompactionMode mode, java.lang.String codetext)
Adds codetext with the specified QR compaction mode to the extended codetext items.
mode - QR compaction mode for the codetext.codetext - Codetext in Unicode to add as an extended codetext item.java.lang.IllegalArgumentException - The specified codetext cannot be encoded in the selected QR compaction mode.public java.lang.String getExtendedCodetext()
Generates Extended codetext from the extended codetext list.
getExtendedCodetext in class ExtCodetextBuilder