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

Barcode generation parameters. More...

Inherits 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 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)
 GS1 Composite Bar parameters. 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 getCode128 (self)
 Code128 parameters. More...
 
def getAztec (self)
 Aztec parameters. More...
 
def getCodabar (self)
 Codabar parameters. More...
 
def getCoupon (self)
 Coupon parameters. More...
 
def getHanXin (self)
 HanXin parameters. More...
 
- Public Member Functions inherited from BaseJavaClass
def getJavaClass (self)
 
def setJavaClass (self, javaClass)
 
def getJavaClassName (self)
 
def isNull (self)
 
def printJavaClassName (self)
 

Public Attributes

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

Detailed Description

Barcode generation parameters.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  javaClass 
)

Reimplemented from BaseJavaClass.

Member Function Documentation

◆ getAustralianPost()

def getAustralianPost (   self)

AustralianPost barcode parameters.

◆ getAztec()

def getAztec (   self)

Aztec parameters.

◆ getBarColor()

def getBarColor (   self)

Bars color, representation of an RGB tuple.

Default value: 0

◆ getBarHeight()

def 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 getBarWidthReduction (   self)

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

Returns
Unit value of BarWidthReduction

◆ getChecksumAlwaysShow()

def getChecksumAlwaysShow (   self)

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

◆ getCodabar()

def getCodabar (   self)

Codabar parameters.

◆ getCodablock()

def getCodablock (   self)

Codablock parameters.

◆ getCode128()

def getCode128 (   self)

Code128 parameters.

◆ getCode16K()

def getCode16K (   self)

Code16K parameters.

◆ getCodeTextParameters()

def getCodeTextParameters (   self)

Codetext parameters.

◆ getCoupon()

def getCoupon (   self)

Coupon parameters.

Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.

◆ getDataBar()

def getDataBar (   self)

Databar parameters.

◆ getDataMatrix()

def getDataMatrix (   self)

DataMatrix parameters.

◆ getDotCode()

def getDotCode (   self)

DotCode parameters.

◆ getEnableEscape()

def 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 getFilledBars (   self)

Gets a value indicating whether bars filled.

Only for 1D barcodes. Default value: true.

◆ getGS1CompositeBar()

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

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)
@return GS1CompositeBarParameters GS1 Composite Bar parameters.

◆ getHanXin()

def getHanXin (   self)

HanXin parameters.

◆ getITF()

def getITF (   self)

ITF parameters.

◆ getMaxiCode()

def getMaxiCode (   self)

MaxiCode parameters.

◆ getPadding()

def getPadding (   self)

Barcode paddings.

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

◆ getPatchCode()

def getPatchCode (   self)

PatchCode parameters.

◆ getPdf417()

def getPdf417 (   self)

PDF417 parameters.

◆ getPostal()

def getPostal (   self)

Postal parameters.

Used for Postnet, Planet.

◆ getQR()

def getQR (   self)

QR parameters.

◆ getSupplement()

def getSupplement (   self)

Supplement parameters.

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

◆ getWideNarrowRatio()

def 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 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 init (   self)

initialize properties

Reimplemented from BaseJavaClass.

◆ isChecksumEnabled()

def 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

◆ setBarColor()

def setBarColor (   self,
  value 
)

Bars color, representation of an RGB tuple.

Default value: 0.

◆ setBarHeight()

def 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 setBarWidthReduction (   self,
  value 
)

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

◆ setChecksumAlwaysShow()

def setChecksumAlwaysShow (   self,
  value 
)

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

◆ setChecksumEnabled()

def 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 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 setFilledBars (   self,
  value 
)

Sets a value indicating whether bars filled.

Only for 1D barcodes. Default value: true.

◆ setGS1CompositeBar()

def setGS1CompositeBar (   self,
  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 = 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 setPadding (   self,
  value 
)

Barcode paddings.

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

◆ setWideNarrowRatio()

def 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 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

australianPost

◆ aztec

aztec

◆ barHeight

barHeight

◆ barWidthReduction

barWidthReduction

◆ codabar

codabar

◆ codablock

codablock

◆ code128

code128

◆ code16K

code16K

◆ codeTextParameters

codeTextParameters

◆ coupon

coupon

◆ dataBar

dataBar

◆ dataMatrix

dataMatrix

◆ dotCode

dotCode

◆ gs1CompositeBar

gs1CompositeBar

◆ hanXin

hanXin

◆ itf

itf

◆ maxiCode

maxiCode

◆ padding

padding

◆ patchCode

patchCode

◆ pdf417

pdf417

◆ postal

postal

◆ qr

qr

◆ supplement

supplement

◆ xDimension

xDimension