QrExtCodetextBuilder
Inheritance: java.lang.Object, com.aspose.barcode.generation.ExtCodetextBuilder
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.
//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
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR);
generator.getParameters().getBarcode().getQR().setEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
generator.getParameters().getBarcode().getQR().setErrorLevel(QRErrorLevel.LEVEL_L);
generator.setCodeText(codetext);
generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
generator.save("test.bmp");
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 codetext
String codetext = textBuilder.getExtendedCodetext();
//generate
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR);
generator.getParameters().getBarcode().getQR().setEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
generator.getParameters().getBarcode().getQR().setErrorLevel(QRErrorLevel.LEVEL_L);
generator.setCodeText(codetext);
generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
generator.save("test.bmp");
This sample shows how to use multi ECI mode in Extended Mode.
//create codetext
QrExtCodetextBuilder textBuilder = new QrExtCodetextBuilder();
textBuilder.addECICodetext(ECIEncodings.WIN_1251, "Will");
textBuilder.addECICodetext(ECIEncodings.UTF_8, "Right");
textBuilder.addECICodetext(ECIEncodings.UTF_16_BE, "Power");
textBuilder.addPlainCodetext("t\\e\\\\st");
textBuilder.addCodetextWithCompactionMode(QrExtCompactionMode.ALPHA_NUMERIC, "ASPOSE2001");
textBuilder.addCodetextWithCompactionMode(QrExtCompactionMode.NUMERIC, "20012026");
//generate codetext
String codetext = textBuilder.getExtendedCodetext();
//generate
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.QR);
generator.getParameters().getBarcode().getQR().setEncodeMode(QREncodeMode.EXTENDED_CODETEXT);
generator.getParameters().getBarcode().getQR().setErrorLevel(QRErrorLevel.LEVEL_L);
generator.setCodeText(codetext);
generator.getParameters().getBarcode().getCodeTextParameters().setTwoDDisplayText("My Text");
generator.save("test.bmp");
Constructors
| Constructor | Description |
|---|---|
| QrExtCodetextBuilder() |
Methods
| Method | Description |
|---|---|
| addCodetextWithCompactionMode(QrExtCompactionMode mode, String codetext) | Adds codetext with the specified QR compaction mode to the extended codetext items. |
| addECICodetext(int ECIEncoding, String codetext) | Adds codetext with Extended Channel Identifier |
| addFNC1FirstPosition() | Sets FNC1 in first position. |
| addFNC1GroupSeparator() | Adds Group Separator (GS - ‘\\u001D’) to the extended codetext items |
| addFNC1SecondPosition(String codetext) | Sets FNC1 in second position. |
| addPlainCodetext(String codetext) | Adds plain codetext to the extended codetext items |
| clear() | Clears extended codetext items |
| equals(Object arg0) | |
| getClass() | |
| getExtendedCodetext() | Generates Extended codetext from the extended codetext list. |
| hashCode() | |
| notify() | |
| notifyAll() | |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
QrExtCodetextBuilder()
public QrExtCodetextBuilder()
addCodetextWithCompactionMode(QrExtCompactionMode mode, String codetext)
public final void addCodetextWithCompactionMode(QrExtCompactionMode mode, String codetext)
Adds codetext with the specified QR compaction mode to the extended codetext items.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| mode | QrExtCompactionMode | QR compaction mode for the codetext. |
| codetext | java.lang.String | Codetext in Unicode to add as an extended codetext item. |
addECICodetext(int ECIEncoding, String codetext)
public final void addECICodetext(int ECIEncoding, String codetext)
Adds codetext with Extended Channel Identifier
Parameters:
| Parameter | Type | Description |
|---|---|---|
| ECIEncoding | int | Extended Channel Identifier |
| codetext | java.lang.String | Codetext in unicode to add as extended codetext item with Extended Channel Identifier |
addFNC1FirstPosition()
public final void addFNC1FirstPosition()
Sets FNC1 in first position. If another FNC1 mode was set before, it is replaced.
addFNC1GroupSeparator()
public final void addFNC1GroupSeparator()
Adds Group Separator (GS - ‘\\u001D’) to the extended codetext items
addFNC1SecondPosition(String codetext)
public final void addFNC1SecondPosition(String codetext)
Sets FNC1 in second position. If another FNC1 mode was set before, it is replaced.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| codetext | java.lang.String | 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. |
addPlainCodetext(String codetext)
public final void addPlainCodetext(String codetext)
Adds plain codetext to the extended codetext items
Parameters:
| Parameter | Type | Description |
|---|---|---|
| codetext | java.lang.String | Codetext in unicode to add as extended codetext item |
clear()
public void clear()
Clears extended codetext items
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getExtendedCodetext()
public String getExtendedCodetext()
Generates Extended codetext from the extended codetext list.
Returns: java.lang.String - Extended codetext as string
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |