MacroCharacter
Inheritance: java.lang.Object, java.lang.Enum
public enum MacroCharacter extends Enum<MacroCharacter>
Macro Characters 05 and 06 values are used to obtain more compact encoding in special modes. 05 Macro craracter is translated to “[)>05” as decoded data header and “” as decoded data trailer. 06 Macro craracter is translated to “[)>06” as decoded data header and “” as decoded data trailer.
hese samples show how to encode Macro Characters in MicroPdf417 and DataMatrix
//to generate autoidentified GS1 message like this "(10)123ABC(10)123ABC" in ISO 15434 format you need:
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.DATA_MATRIX, "10123ABC10123ABC");
generator.getParameters().getBarcode().getDataMatrix().setMacroCharacters(MacroCharacter.MACRO_05);
BarCodeReader reader = new BarCodeReader(generator.generateBarCodeImage(), DecodeType.GS1DataMatrix);
for (BarCodeResult result : reader.readBarCodes())
System.out.println("BarCode CodeText: " + result.getCodeText());
//Encodes MicroPdf417 with 05 Macro the string: "[)>05abcde1234"
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MicroPdf417, "abcde1234");
generator.getParameters().getBarcode().getPdf417().setMacroCharacters(MacroCharacter.MACRO_05);
BarCodeReader reader = new BarCodeReader(generator.generateBarCodeImage(), DecodeType.MICRO_PDF_417);
for(BarCodeResult result : reader.readBarCodes())
System.out.println(result.getCodeText());
//Encodes MicroPdf417 with 06 Macro the string: "[)>06abcde1234"
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.MicroPdf417, "abcde1234");
generator.getParameters().getBarcode().getPdf417().setMacroCharacters(MacroCharacter.MACRO_06);
BarCodeReader reader = new BarCodeReader(generator.generateBarCodeImage(), DecodeType.MICRO_PDF_417);
for(BarCodeResult result : reader.readBarCodes())
System.out.println(result.getCodeText());
Fields
Field | Description |
---|---|
MACRO_05 | 05 Macro craracter is added to barcode data in first position. |
MACRO_06 | 06 Macro craracter is added to barcode data in first position. |
NONE | None of Macro Characters are added to barcode data |
Methods
MACRO_05
public static final MacroCharacter MACRO_05
05 Macro craracter is added to barcode data in first position. GS1 Data Identifier ISO 15434 Character is translated to “[)>05” as decoded data header and “” as decoded data trailer.
MACRO_06
public static final MacroCharacter MACRO_06
06 Macro craracter is added to barcode data in first position. ASC MH10 Data Identifier ISO 15434 Character is translated to “[)>06” as decoded data header and “” as decoded data trailer.
NONE
public static final MacroCharacter NONE
None of Macro Characters are added to barcode data
valueOf(Class arg0, String arg1)
public static T <T>valueOf(Class<T> arg0, String arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Class | |
arg1 | java.lang.String |
Returns: T
compareTo(E arg0)
public final int compareTo(E arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | E |
Returns: int
equals(Object arg0)
public final boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.lang.Object |
Returns: boolean
fromValue(int value)
public static MacroCharacter fromValue(int value)
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
Returns: MacroCharacter
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getDeclaringClass()
public final Class<E> getDeclaringClass()
Returns:
java.lang.Class
getValue()
public int getValue()
Returns: int
hashCode()
public final int hashCode()
Returns: int
name()
public final String name()
Returns: java.lang.String
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
ordinal()
public final int ordinal()
Returns: int
toString()
public String toString()
Returns: java.lang.String
valueOf(String name)
public static MacroCharacter valueOf(String name)
Parameters:
Parameter | Type | Description |
---|---|---|
name | java.lang.String |
Returns: MacroCharacter
values()
public static MacroCharacter[] values()
Returns: com.aspose.barcode.generation.MacroCharacter[]
wait()
public final void wait()
wait(long arg0)
public final native 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 |