Aspose.Barcode for Python via Java Generation and Recognition API docs
BarcodeParameters Class Reference

Barcode generation parameters. More...

Inherits _MwWrapper.

Public Member Functions

def __init__ (self, java_class)
 
AustralianPostParameters australian_post (self)
 AustralianPost barcode parameters. More...
 
AztecParameters aztec (self)
 Aztec parameters. More...
 
Tuple[int, int, int] bar_color (self)
 Bars color, representation of an RGB tuple. More...
 
None bar_color (self, Tuple[int, int, int] value)
 Bars color, representation of an RGB tuple. More...
 
Unit bar_height (self)
 Height of 1D barcodes' bars in Unit value. More...
 
None bar_height (self, Unit value)
 Height of 1D barcodes' bars in Unit value. More...
 
Unit bar_width_reduction (self)
 Get bars reduction value that is used to compensate ink spread while printing. More...
 
None bar_width_reduction (self, Unit value)
 Sets bars reduction value that is used to compensate ink spread while printing. More...
 
bool checksum_always_show (self)
 Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. More...
 
None checksum_always_show (self, bool value)
 Always display checksum digit in the human-readable text for Code128 and GS1Code128 barcodes. More...
 
EnableChecksum checksum_enabled (self)
 Enable checksum during generation 1D barcodes. More...
 
None checksum_enabled (self, EnableChecksum value)
 Enable checksum during generation 1D barcodes. More...
 
CodabarParameters codabar (self)
 Codabar parameters. More...
 
CodablockParameters codablock (self)
 Codablock parameters. More...
 
Code128Parameters code_128 (self)
 Code128 parameters. More...
 
Code16KParameters code_16k (self)
 Code16K parameters. More...
 
CodetextParameters codetext_parameters (self)
 Codetext parameters. More...
 
CouponParameters coupon (self)
 Coupon parameters. More...
 
DataBarParameters data_bar (self)
 Databar parameters. More...
 
DataMatrixParameters data_matrix (self)
 DataMatrix parameters. More...
 
DotCodeParameters dot_code (self)
 DotCode parameters. More...
 
bool enable_escape (self)
 Indicates whether explains the character "\" as an escape character in CodeText property. More...
 
None enable_escape (self, bool value)
 Indicates whether explains the character "\" as an escape character in CodeText property. More...
 
bool filled_bars (self)
 Gets a value indicating whether bars filled. More...
 
None filled_bars (self, bool value)
 Sets a value indicating whether bars filled. More...
 
GS1CompositeBarParameters gs1_composite_bar (self)
 GS1 Composite Bar parameters. More...
 
None gs1_composite_bar (self, GS1CompositeBarParameters value)
 GS1 Composite Bar parameters. More...
 
HanXinParameters han_xin (self)
 HanXin parameters. More...
 
ITFParameters itf (self)
 ITF parameters. More...
 
MaxiCodeParameters maxi_code (self)
 MaxiCode parameters. More...
 
Padding padding (self)
 Barcode paddings. More...
 
PatchCodeParameters patch_code (self)
 PatchCode parameters. More...
 
Pdf417Parameters pdf_417 (self)
 PDF417 parameters. More...
 
PostalParameters postal (self)
 Postal parameters. More...
 
QrParameters qr (self)
 QR parameters. More...
 
SupplementParameters supplement (self)
 Supplement parameters. More...
 
float wide_narrow_ratio (self)
 Wide bars to Narrow bars ratio. More...
 
None wide_narrow_ratio (self, float value)
 Wide bars to Narrow bars ratio. More...
 
Unit x_dimension (self)
 x-dimension is the smallest width of the unit of BarCode bars or spaces. More...
 
None x_dimension (self, Unit unit)
 x-dimension is the smallest width of the unit of BarCode bars or spaces. More...
 

Detailed Description

Barcode generation parameters.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  java_class 
)

Member Function Documentation

◆ australian_post()

AustralianPostParameters australian_post (   self)

AustralianPost barcode parameters.

◆ aztec()

AztecParameters aztec (   self)

Aztec parameters.

◆ bar_color() [1/2]

Tuple[int, int, int] bar_color (   self)

Bars color, representation of an RGB tuple.

Default value: 0

◆ bar_color() [2/2]

None bar_color (   self,
Tuple[int, int, int]  value 
)

Bars color, representation of an RGB tuple.

Default value: 0.

◆ bar_height() [1/2]

Unit bar_height (   self)

Height of 1D barcodes' bars in Unit value.

Ignored if AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.

Exceptions
BarCodeException

◆ bar_height() [2/2]

None bar_height (   self,
Unit  value 
)

Height of 1D barcodes' bars in Unit value.

Ignored if AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.

Exceptions
BarCodeException

◆ bar_width_reduction() [1/2]

Unit bar_width_reduction (   self)

Get bars reduction value that is used to compensate ink spread while printing.

Returns
Unit value of BarWidthReduction

◆ bar_width_reduction() [2/2]

None bar_width_reduction (   self,
Unit  value 
)

Sets bars reduction value that is used to compensate ink spread while printing.

◆ checksum_always_show() [1/2]

bool checksum_always_show (   self)

Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.

◆ checksum_always_show() [2/2]

None checksum_always_show (   self,
bool  value 
)

Always display checksum digit in the human-readable text for Code128 and GS1Code128 barcodes.

◆ checksum_enabled() [1/2]

EnableChecksum checksum_enabled (   self)

Enable checksum during generation 1D barcodes.

Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology

◆ checksum_enabled() [2/2]

None checksum_enabled (   self,
EnableChecksum  value 
)

Enable checksum during generation 1D barcodes.

Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible. Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar Checksum always used: Rest symbology

◆ codabar()

CodabarParameters codabar (   self)

Codabar parameters.

◆ codablock()

CodablockParameters codablock (   self)

Codablock parameters.

◆ code_128()

Code128Parameters code_128 (   self)

Code128 parameters.

◆ code_16k()

Code16KParameters code_16k (   self)

Code16K parameters.

◆ codetext_parameters()

CodetextParameters codetext_parameters (   self)

Codetext parameters.

◆ coupon()

CouponParameters coupon (   self)

Coupon parameters.

Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.

◆ data_bar()

DataBarParameters data_bar (   self)

Databar parameters.

◆ data_matrix()

DataMatrixParameters data_matrix (   self)

DataMatrix parameters.

◆ dot_code()

DotCodeParameters dot_code (   self)

DotCode parameters.

◆ enable_escape() [1/2]

bool enable_escape (   self)

Indicates whether explains the character "\" as an escape character in CodeText property.

Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is True, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters. Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \CR stands for CR.

◆ enable_escape() [2/2]

None enable_escape (   self,
bool  value 
)

Indicates whether explains the character "\" as an escape character in CodeText property.

Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is True, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters. Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \CR stands for CR.

◆ filled_bars() [1/2]

bool filled_bars (   self)

Gets a value indicating whether bars filled.

Only for 1D barcodes. Default value: True.

◆ filled_bars() [2/2]

None filled_bars (   self,
bool  value 
)

Sets a value indicating whether bars filled.

Only for 1D barcodes. Default value: True.

◆ gs1_composite_bar() [1/2]

GS1CompositeBarParameters gs1_composite_bar (   self)

GS1 Composite Bar parameters.

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(EncodeTypes.GS_1_COMPOSITE_BAR, codetext)
generator.parameters.barcode.gs1_composite_bar.linear_component_type = EncodeTypes.GS_1_CODE_128
generator.parameters.barcode.gs1_composite_bar.two_d_component_type = TwoDComponentType.CC_A
# Aspect ratio of 2D component
generator.parameters.barcode.pdf417.aspect_ratio = 3
# X-Dimension of 1D and 2D components
generator.parameters.barcode.x_dimension.pixels = 3
# Height of 1D component
generator.parameters.barcode.bar_height.pixels = 100
generator.save(self.image_path_to_save4, BarCodeImageFormat.PNG)
Returns
GS1CompositeBarParameters GS1 Composite Bar parameters.

◆ gs1_composite_bar() [2/2]

None gs1_composite_bar (   self,
GS1CompositeBarParameters  value 
)

GS1 Composite Bar parameters.

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 = BarcodeGenerator(Generation.EncodeTypes.GS_1_COMPOSITE_BAR, codetext)
generator.parameters.barcode.gs1_composite_bar.linear_component_type = EncodeTypes.GS_1_CODE_128
generator.parameters.barcode.gs1_composite_bar.two_d_component_type = TwoDComponentType.CC_A
# Aspect ratio of 2D component
generator.parameters.barcode.pdf417.aspect_ratio = 3
# X-Dimension of 1D and 2D components
generator.parameters.barcode.x_dimension.pixels = 3
# Height of 1D component
generator.parameters.barcode.bar_height.pixels = 100
generator.save(self.image_path_to_save4, BarCodeImageFormat.PNG)

◆ han_xin()

HanXinParameters han_xin (   self)

HanXin parameters.

◆ itf()

ITFParameters itf (   self)

ITF parameters.

◆ maxi_code()

MaxiCodeParameters maxi_code (   self)

MaxiCode parameters.

◆ padding()

Padding padding (   self)

Barcode paddings.

Default value: 5pt 5pt 5pt 5pt.

◆ patch_code()

PatchCodeParameters patch_code (   self)

PatchCode parameters.

◆ pdf_417()

Pdf417Parameters pdf_417 (   self)

PDF417 parameters.

◆ postal()

PostalParameters postal (   self)

Postal parameters.

Used for Postnet, Planet.

◆ qr()

QrParameters qr (   self)

QR parameters.

◆ supplement()

SupplementParameters supplement (   self)

Supplement parameters.

Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN.

◆ wide_narrow_ratio() [1/2]

float wide_narrow_ratio (   self)

Wide bars to Narrow bars ratio.

Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard The WideNarrowRatio parameter value is less than or equal to 0.

◆ wide_narrow_ratio() [2/2]

None wide_narrow_ratio (   self,
float  value 
)

Wide bars to Narrow bars ratio.

Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39Extended, Code39Standard The WideNarrowRatio parameter value is less than or equal to 0.

◆ x_dimension() [1/2]

Unit x_dimension (   self)

x-dimension is the smallest width of the unit of BarCode bars or spaces.

Increasing this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.

◆ x_dimension() [2/2]

None x_dimension (   self,
Unit  unit 
)

x-dimension is the smallest width of the unit of BarCode bars or spaces.

Increasing this will increase the whole barcode image width. Ignored if AutoSizeMode property is set to AutoSizeMode.NEAREST or AutoSizeMode.INTERPOLATION.

Exceptions
BarCodeException