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

Barcode generation parameters. More...

Inherits asposebarcode.Assist.BaseJavaClass.

Public Member Functions

def __init__ (self, javaClass)
 
def init (self)
 initialize properties More...
 
def getXDimension (self)
 x-dimension is the smallest width of the unit of BarCode bars or spaces. More...
 
def setXDimension (self, value)
 x-dimension is the smallest width of the unit of BarCode bars or spaces. More...
 
def getBarWidthReduction (self)
 Get bars reduction value that is used to compensate ink spread while printing. More...
 
def setBarWidthReduction (self, value)
 Sets bars reduction value that is used to compensate ink spread while printing. More...
 
def getBarHeight (self)
 Height of 1D barcodes' bars in Unit value. More...
 
def setBarHeight (self, value)
 Height of 1D barcodes' bars in Unit value. More...
 
def getAutoSizeMode (self)
 Specifies the different types of automatic sizing modes. More...
 
def setAutoSizeMode (self, value)
 Specifies the different types of automatic sizing modes. More...
 
def getBarColor (self)
 Bars color, representation of an RGB tuple. More...
 
def setBarColor (self, value)
 Bars color, representation of an RGB tuple. More...
 
def getPadding (self)
 Barcode paddings. More...
 
def setPadding (self, value)
 Barcode paddings. More...
 
def getChecksumAlwaysShow (self)
 Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. More...
 
def setChecksumAlwaysShow (self, value)
 Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. More...
 
def isChecksumEnabled (self)
 Enable checksum during generation 1D barcodes. More...
 
def setChecksumEnabled (self, value)
 Enable checksum during generation 1D barcodes. More...
 
def getEnableEscape (self)
 Indicates whether explains the character "\" as an escape character in CodeText property. More...
 
def setEnableEscape (self, value)
 Indicates whether explains the character "\" as an escape character in CodeText property. More...
 
def getWideNarrowRatio (self)
 Wide bars to Narrow bars ratio. More...
 
def setWideNarrowRatio (self, value)
 Wide bars to Narrow bars ratio. More...
 
def getCodeTextParameters (self)
 Codetext parameters. More...
 
def getFilledBars (self)
 Gets a value indicating whether bars filled. More...
 
def setFilledBars (self, value)
 Sets a value indicating whether bars filled. More...
 
def getPostal (self)
 Postal parameters. More...
 
def getPatchCode (self)
 PatchCode parameters. More...
 
def getAustralianPost (self)
 AustralianPost barcode parameters. More...
 
def getDataBar (self)
 Databar parameters. More...
 
def getGS1CompositeBar (self)
 /** More...
 
def setGS1CompositeBar (self, value)
 GS1 Composite Bar parameters. More...
 
def getCodablock (self)
 Codablock parameters. More...
 
def getDataMatrix (self)
 DataMatrix parameters. More...
 
def getCode16K (self)
 Code16K parameters. More...
 
def getDotCode (self)
 DotCode parameters. More...
 
def getITF (self)
 ITF parameters. More...
 
def getPdf417 (self)
 PDF417 parameters. More...
 
def getQR (self)
 QR parameters. More...
 
def getSupplement (self)
 Supplement parameters. More...
 
def getMaxiCode (self)
 MaxiCode parameters. More...
 
def getAztec (self)
 Aztec parameters. More...
 
def getCodabar (self)
 Codabar parameters. More...
 
def getCoupon (self)
 Coupon parameters. More...
 
- Public Member Functions inherited from asposebarcode.Assist.BaseJavaClass
def getJavaClass (self)
 
def setJavaClass (self, javaClass)
 
def getJavaClassName (self)
 
def isNull (self)
 
def printJavaClassName (self)
 

Public Attributes

 xDimension
 
 barHeight
 
 barCodeWidth
 
 barCodeHeight
 
 codeTextParameters
 
 postal
 
 australianPost
 
 codablock
 
 dataBar
 
 gs1CompositeBar
 
 dataMatrix
 
 code16K
 
 itf
 
 qr
 
 pdf417
 
 maxiCode
 
 aztec
 
 codabar
 
 coupon
 
 supplement
 
 dotCode
 
 padding
 
 patchCode
 
 barWidthReduction
 
- Public Attributes inherited from asposebarcode.Assist.BaseJavaClass
 javaClass
 
 javaClassName
 

Detailed Description

Barcode generation parameters.

Constructor & Destructor Documentation

◆ __init__()

def asposebarcode.Generation.BarcodeParameters.__init__ (   self,
  javaClass 
)

Member Function Documentation

◆ getAustralianPost()

def asposebarcode.Generation.BarcodeParameters.getAustralianPost (   self)

AustralianPost barcode parameters.

◆ getAutoSizeMode()

def asposebarcode.Generation.BarcodeParameters.getAutoSizeMode (   self)

Specifies the different types of automatic sizing modes.

Default value: AutoSizeMode.NONE.

Deprecated:
"This method is obsolete. Call BaseGenerationParameters.getAutoSizeMode() instead."
Exceptions
BarCodeException

◆ getAztec()

def asposebarcode.Generation.BarcodeParameters.getAztec (   self)

Aztec parameters.

◆ getBarColor()

def asposebarcode.Generation.BarcodeParameters.getBarColor (   self)

Bars color, representation of an RGB tuple.

Default value: 0

◆ getBarHeight()

def asposebarcode.Generation.BarcodeParameters.getBarHeight (   self)

Height of 1D barcodes' bars in Unit value.

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

Exceptions
BarCodeException

◆ getBarWidthReduction()

def asposebarcode.Generation.BarcodeParameters.getBarWidthReduction (   self)

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

Returns
Unit value of BarWidthReduction

◆ getChecksumAlwaysShow()

def asposebarcode.Generation.BarcodeParameters.getChecksumAlwaysShow (   self)

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

◆ getCodabar()

def asposebarcode.Generation.BarcodeParameters.getCodabar (   self)

Codabar parameters.

◆ getCodablock()

def asposebarcode.Generation.BarcodeParameters.getCodablock (   self)

Codablock parameters.

◆ getCode16K()

def asposebarcode.Generation.BarcodeParameters.getCode16K (   self)

Code16K parameters.

◆ getCodeTextParameters()

def asposebarcode.Generation.BarcodeParameters.getCodeTextParameters (   self)

Codetext parameters.

◆ getCoupon()

def asposebarcode.Generation.BarcodeParameters.getCoupon (   self)

Coupon parameters.

Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.

◆ getDataBar()

def asposebarcode.Generation.BarcodeParameters.getDataBar (   self)

Databar parameters.

◆ getDataMatrix()

def asposebarcode.Generation.BarcodeParameters.getDataMatrix (   self)

DataMatrix parameters.

◆ getDotCode()

def asposebarcode.Generation.BarcodeParameters.getDotCode (   self)

DotCode parameters.

◆ getEnableEscape()

def asposebarcode.Generation.BarcodeParameters.getEnableEscape (   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.

◆ getFilledBars()

def asposebarcode.Generation.BarcodeParameters.getFilledBars (   self)

Gets a value indicating whether bars filled.

Only for 1D barcodes. Default value: true.

◆ getGS1CompositeBar()

def asposebarcode.Generation.BarcodeParameters.getGS1CompositeBar (   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 '/'
  • # 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", Generation.BarcodeImageFormat.PNG);

◆ getITF()

def asposebarcode.Generation.BarcodeParameters.getITF (   self)

ITF parameters.

◆ getMaxiCode()

def asposebarcode.Generation.BarcodeParameters.getMaxiCode (   self)

MaxiCode parameters.

◆ getPadding()

def asposebarcode.Generation.BarcodeParameters.getPadding (   self)

Barcode paddings.

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

◆ getPatchCode()

def asposebarcode.Generation.BarcodeParameters.getPatchCode (   self)

PatchCode parameters.

◆ getPdf417()

def asposebarcode.Generation.BarcodeParameters.getPdf417 (   self)

PDF417 parameters.

◆ getPostal()

def asposebarcode.Generation.BarcodeParameters.getPostal (   self)

Postal parameters.

Used for Postnet, Planet.

◆ getQR()

def asposebarcode.Generation.BarcodeParameters.getQR (   self)

QR parameters.

◆ getSupplement()

def asposebarcode.Generation.BarcodeParameters.getSupplement (   self)

Supplement parameters.

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

◆ getWideNarrowRatio()

def asposebarcode.Generation.BarcodeParameters.getWideNarrowRatio (   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.

◆ getXDimension()

def asposebarcode.Generation.BarcodeParameters.getXDimension (   self)

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

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

◆ init()

def asposebarcode.Generation.BarcodeParameters.init (   self)

initialize properties

Reimplemented from asposebarcode.Assist.BaseJavaClass.

◆ isChecksumEnabled()

def asposebarcode.Generation.BarcodeParameters.isChecksumEnabled (   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

◆ setAutoSizeMode()

def asposebarcode.Generation.BarcodeParameters.setAutoSizeMode (   self,
  value 
)

Specifies the different types of automatic sizing modes.

Default value: AutoSizeMode.NONE.

Deprecated:
"This method is obsolete. Call BaseGenerationParameters.setAutoSizeMode() instead."
Exceptions
BarCodeException

◆ setBarColor()

def asposebarcode.Generation.BarcodeParameters.setBarColor (   self,
  value 
)

Bars color, representation of an RGB tuple.

Default value: 0.

◆ setBarHeight()

def asposebarcode.Generation.BarcodeParameters.setBarHeight (   self,
  value 
)

Height of 1D barcodes' bars in Unit value.

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

Exceptions
BarCodeException

◆ setBarWidthReduction()

def asposebarcode.Generation.BarcodeParameters.setBarWidthReduction (   self,
  value 
)

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

◆ setChecksumAlwaysShow()

def asposebarcode.Generation.BarcodeParameters.setChecksumAlwaysShow (   self,
  value 
)

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

◆ setChecksumEnabled()

def asposebarcode.Generation.BarcodeParameters.setChecksumEnabled (   self,
  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

◆ setEnableEscape()

def asposebarcode.Generation.BarcodeParameters.setEnableEscape (   self,
  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.

◆ setFilledBars()

def asposebarcode.Generation.BarcodeParameters.setFilledBars (   self,
  value 
)

Sets a value indicating whether bars filled.

Only for 1D barcodes. Default value: true.

◆ setGS1CompositeBar()

def asposebarcode.Generation.BarcodeParameters.setGS1CompositeBar (   self,
  value 
)

GS1 Composite Bar parameters.

This sample shows how to create and save a GS1 Composite Bar image. ote 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("test.png", Generation.BarcodeImageFormat.PNG);

◆ setPadding()

def asposebarcode.Generation.BarcodeParameters.setPadding (   self,
  value 
)

Barcode paddings.

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

◆ setWideNarrowRatio()

def asposebarcode.Generation.BarcodeParameters.setWideNarrowRatio (   self,
  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.

◆ setXDimension()

def asposebarcode.Generation.BarcodeParameters.setXDimension (   self,
  value 
)

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

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

Exceptions
BarCodeException

Member Data Documentation

◆ australianPost

asposebarcode.Generation.BarcodeParameters.australianPost

◆ aztec

asposebarcode.Generation.BarcodeParameters.aztec

◆ barCodeHeight

asposebarcode.Generation.BarcodeParameters.barCodeHeight

◆ barCodeWidth

asposebarcode.Generation.BarcodeParameters.barCodeWidth

◆ barHeight

asposebarcode.Generation.BarcodeParameters.barHeight

◆ barWidthReduction

asposebarcode.Generation.BarcodeParameters.barWidthReduction

◆ codabar

asposebarcode.Generation.BarcodeParameters.codabar

◆ codablock

asposebarcode.Generation.BarcodeParameters.codablock

◆ code16K

asposebarcode.Generation.BarcodeParameters.code16K

◆ codeTextParameters

asposebarcode.Generation.BarcodeParameters.codeTextParameters

◆ coupon

asposebarcode.Generation.BarcodeParameters.coupon

◆ dataBar

asposebarcode.Generation.BarcodeParameters.dataBar

◆ dataMatrix

asposebarcode.Generation.BarcodeParameters.dataMatrix

◆ dotCode

asposebarcode.Generation.BarcodeParameters.dotCode

◆ gs1CompositeBar

asposebarcode.Generation.BarcodeParameters.gs1CompositeBar

◆ itf

asposebarcode.Generation.BarcodeParameters.itf

◆ maxiCode

asposebarcode.Generation.BarcodeParameters.maxiCode

◆ padding

asposebarcode.Generation.BarcodeParameters.padding

◆ patchCode

asposebarcode.Generation.BarcodeParameters.patchCode

◆ pdf417

asposebarcode.Generation.BarcodeParameters.pdf417

◆ postal

asposebarcode.Generation.BarcodeParameters.postal

◆ qr

asposebarcode.Generation.BarcodeParameters.qr

◆ supplement

asposebarcode.Generation.BarcodeParameters.supplement

◆ xDimension

asposebarcode.Generation.BarcodeParameters.xDimension