Package com.aspose.barcode.generation
Enum Class TwoDComponentType
- All Implemented Interfaces:
Serializable,Comparable<TwoDComponentType>,Constable
Type of 2D component
This sample shows how to create and save a GS1 Composite Bar image.
Note that 1D codetext and 2D codetext are separated by symbol '/'
String codetext = "(01)03212345678906/(21)A1B2C3D4E5F6G7H8";
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.GS_1_COMPOSITE_BAR, codetext);
generator.getParameters().getBarcode().getGS1CompositeBar().setLinearComponentType(EncodeTypes.GS_1_CODE_128);
generator.getParameters().getBarcode().getGS1CompositeBar().setTwoDComponentType(TwoDComponentType.CC_A);
// Aspect ratio of 2D component
generator.getParameters().getBarcode().getPdf417().setAspectRatio(3);
// X-Dimension of 1D and 2D components
generator.getParameters().getBarcode().getXDimension().setPixels(3);
// Height of 1D component
generator.getParameters().getBarcode().getBarHeight().setPixels(100);
generator.save("test.png");
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintgetValue()static TwoDComponentTypeReturns the enum constant of this class with the specified name.static TwoDComponentType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AUTO
Auto select type of 2D component -
CC_A
CC-A type of 2D component. It is a structural variant of MicroPDF417 -
CC_B
CC-B type of 2D component. It is a MicroPDF417 symbol. -
CC_C
CC-C type of 2D component. It is a PDF417 symbol.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getValue
public int getValue()
-