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

FieldDescription
MACRO_0505 Macro craracter is added to barcode data in first position.
MACRO_0606 Macro craracter is added to barcode data in first position.
NONENone of Macro Characters are added to barcode data

Methods

MethodDescription
valueOf(Class arg0, String arg1)
compareTo(E arg0)
equals(Object arg0)
fromValue(int value)
getClass()
getDeclaringClass()
getValue()
hashCode()
name()
notify()
notifyAll()
ordinal()
toString()
valueOf(String name)
values()
wait()
wait(long arg0)
wait(long arg0, int arg1)

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:

ParameterTypeDescription
arg0java.lang.Class
arg1java.lang.String

Returns: T

compareTo(E arg0)

public final int compareTo(E arg0)

Parameters:

ParameterTypeDescription
arg0E

Returns: int

equals(Object arg0)

public final boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

fromValue(int value)

public static MacroCharacter fromValue(int value)

Parameters:

ParameterTypeDescription
valueint

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:

ParameterTypeDescription
namejava.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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int