Aspose.BarCode for Python via Java  24.11
Aspose.Barcode for Python via Java Generation and Recognition API docs
TwoDComponentType Class Reference

Type of 2D component This sample shows how to create and save a GS1 Composite Bar image. More...

Inherits Enum.

Static Public Attributes

int AUTO = 0
 Auto select type of 2D component. More...
 
int CC_A = 1
 CC-A type of 2D component. More...
 
int CC_B = 2
 CC-B type of 2D component. More...
 
int CC_C = 3
 CC-C type of 2D component. More...
 

Detailed Description

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 '/'

codetext = "(01)03212345678906|(21)A1B2C3D4E5F6G7H8"
generator = Generation.BarcodeGenerator(Generation.EncodeTypes.GS_1_COMPOSITE_BAR, codetext)
generator.getParameters().getBarcode().getGS1CompositeBar().setLinearComponentType(Generation.EncodeTypes.GS_1_CODE_128)
generator.getParameters().getBarcode().getGS1CompositeBar().setTwoDComponentType(Generation.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(self.image_path_to_save4, Generation.BarCodeImageFormat.PNG)

Member Data Documentation

◆ AUTO

int AUTO = 0
static

Auto select type of 2D component.

◆ CC_A

int CC_A = 1
static

CC-A type of 2D component.

It is a structural variant of MicroPDF417

◆ CC_B

int CC_B = 2
static

CC-B type of 2D component.

It is a MicroPDF417 symbol.

◆ CC_C

int CC_C = 3
static

CC-C type of 2D component.

It is a PDF417 symbol.