Class BarcodeParameters
Barcode generation parameters.
-
Method Summary
Modifier and TypeMethodDescriptionfinal floatfinal AustralianPostParametersAustralianPost barcode parameters.final AztecParametersgetAztec()Aztec parameters.final BaseEncodeTypefinal intBars color.final UnitHeight of 1D barcodes' bars inUnitvalue.final UnitGet bars reduction value that is used to compensate ink spread while printing.final booleanAlways display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.final CodabarParametersCodabar parameters.final CodablockParametersCodablock parameters.final Code128ParametersCode128 parameters.final Code16KParametersCode16K parameters.final Stringfinal CodetextParametersCodetext parameters.final ComplexBarcodefinal CouponParametersCoupon parameters.final DataBarParametersDatabar parameters.final DataMatrixParametersDataMatrix parameters.final DotCodeParametersDotCode parameters.final booleanDeprecated."EnableEscape is deprecated and ignored.final booleanGets a value indicating whether bars filled.GS1 Composite Bar parameters.final HanXinParametersHanXin parameters.final ITFParametersgetITF()ITF parameters.final MaxiCodeParametersMaxiCode parameters.final PaddingBarcode paddings.final PatchCodeParametersPatchCode parameters.final Pdf417ParametersPDF417 parameters.final PostalParametersPostal parameters.final QrParametersgetQR()QR, MicroQR and RectMicroQR parameters.final SupplementParametersSupplement parameters.final booleanOnly for 1D barcodes.final floatWide bars to Narrow bars ratio.final Unitx-dimension is the smallest width of the unit of BarCode bars or spaces.inthashCode()final EnableChecksumfinal voidsetBarColor(int value) Bars color.final voidsetBarHeight(Unit value) Height of 1D barcodes' bars inUnitvalue.final voidsetBarWidthReduction(Unit value) Sets bars reduction value that is used to compensate ink spread while printing.final voidsetChecksumAlwaysShow(boolean value) Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.final voidsetChecksumEnabled(EnableChecksum value) final voidsetCodeText(String value) final voidsetEnableEscape(boolean value) Indicates whether explains the character "\" as an escape character in CodeText property.final voidsetFilledBars(boolean value) Sets a value indicating whether bars filled.final voidGS1 Composite Bar parameters.final voidsetThrowExceptionWhenCodeTextIncorrect(boolean value) Only for 1D barcodes.final voidsetWideNarrowRatio(float value) Wide bars to Narrow bars ratio.final voidsetXDimension(Unit value) x-dimension is the smallest width of the unit of BarCode bars or spaces.
-
Method Details
-
getBarcodeType
-
getCodeText
-
setCodeText
-
getXDimension
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
BaseGenerationParameters.AutoSizeMode(BaseGenerationParameters.getAutoSizeMode()/BaseGenerationParameters.setAutoSizeMode(com.aspose.barcode.generation.AutoSizeMode)) property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. -
setXDimension
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
BaseGenerationParameters.AutoSizeMode(BaseGenerationParameters.getAutoSizeMode()/BaseGenerationParameters.setAutoSizeMode(com.aspose.barcode.generation.AutoSizeMode)) property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. -
getBarHeight
Height of 1D barcodes' bars in
Unitvalue. Ignored ifBaseGenerationParameters.AutoSizeMode(BaseGenerationParameters.getAutoSizeMode()/BaseGenerationParameters.setAutoSizeMode(com.aspose.barcode.generation.AutoSizeMode)) property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. -
setBarHeight
Height of 1D barcodes' bars in
Unitvalue. Ignored ifBaseGenerationParameters.AutoSizeMode(BaseGenerationParameters.getAutoSizeMode()/BaseGenerationParameters.setAutoSizeMode(com.aspose.barcode.generation.AutoSizeMode)) property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation. -
getBarColor
public final int getBarColor()Bars color. Default value: Color.Black.
-
setBarColor
public final void setBarColor(int value) Bars color. Default value: Color.Black.
-
getPadding
Barcode paddings. Default value: 5pt 5pt 5pt 5pt.
-
getChecksumAlwaysShow
public final boolean getChecksumAlwaysShow()Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
-
setChecksumAlwaysShow
public final void setChecksumAlwaysShow(boolean value) Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
-
isChecksumEnabled
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
-
setChecksumEnabled
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
-
getEnableEscape
public final boolean getEnableEscape()Deprecated."EnableEscape is deprecated and ignored. Process escape sequences explicitly (e.g., Regex.Unescape). This property will be removed in future releases."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.
-
setEnableEscape
public final void setEnableEscape(boolean 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.
-
getThrowExceptionWhenCodeTextIncorrect
public final boolean getThrowExceptionWhenCodeTextIncorrect()Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39FullASCII, Code93, Code16K, Code128 symbology if codetext is incorrect.
-
setThrowExceptionWhenCodeTextIncorrect
public final void setThrowExceptionWhenCodeTextIncorrect(boolean value) Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39FullASCII, Code93, Code16K, Code128 symbology if codetext is incorrect.
-
getWideNarrowRatio
public final float getWideNarrowRatio()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, Code39, Code39FullASCII
- Throws:
IllegalArgumentException-<p>The <b>WideNarrowRatio</b> parameter value is less than or equal to 0.</p>
-
setWideNarrowRatio
public final void setWideNarrowRatio(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, Code39, Code39FullASCII
- Throws:
IllegalArgumentException-<p>The <b>WideNarrowRatio</b> parameter value is less than or equal to 0.</p>
-
getCodeTextParameters
Codetext parameters.
-
getFilledBars
public final boolean getFilledBars()Gets a value indicating whether bars filled. Only for 1D barcodes. Default value: true.
- Returns:
- a value indicating whether bars filled.
-
setFilledBars
public final void setFilledBars(boolean value) Sets a value indicating whether bars filled. Only for 1D barcodes. Default value: true.
- Parameters:
value- a value indicating whether bars filled.
-
getBarWidthReduction
Get bars reduction value that is used to compensate ink spread while printing. Default value: 0
- Returns:
- bars reduction value that is used to compensate ink spread while printing.
-
setBarWidthReduction
Sets bars reduction value that is used to compensate ink spread while printing. Default value: 0
- Parameters:
value- bars reduction value that is used to compensate ink spread while printing.
-
getPostal
Postal parameters. Used for Postnet, Planet.
-
getPatchCode
PatchCode parameters.
-
getAustralianPost
AustralianPost barcode parameters.
-
getDataBar
Databar parameters.
-
getGS1CompositeBar
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 '|'
[C#] var codetext = "(01)03212345678906|(21)A1B2C3D4E5F6G7H8"; using (var generator = new BarcodeGenerator(EncodeTypes.GS1CompositeBar, codetext)) { generator.Parameters.Barcode.GS1CompositeBar.LinearComponentType = EncodeTypes.GS1Code128; generator.Parameters.Barcode.GS1CompositeBar.TwoDComponentType = TwoDComponentType.CC_A; // Aspect ratio of 2D component generator.Parameters.Barcode.Pdf417.AspectRatio = 3; // X-Dimension of 1D and 2D components generator.Parameters.Barcode.XDimension.Pixels = 3; // Height of 1D component generator.Parameters.Barcode.BarHeight.Pixels = 100; generator.Save("test.png"); } -
setGS1CompositeBar
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 '|'
[C#] var codetext = "(01)03212345678906|(21)A1B2C3D4E5F6G7H8"; using (var generator = new BarcodeGenerator(EncodeTypes.GS1CompositeBar, codetext)) { generator.Parameters.Barcode.GS1CompositeBar.LinearComponentType = EncodeTypes.GS1Code128; generator.Parameters.Barcode.GS1CompositeBar.TwoDComponentType = TwoDComponentType.CC_A; // Aspect ratio of 2D component generator.Parameters.Barcode.Pdf417.AspectRatio = 3; // X-Dimension of 1D and 2D components generator.Parameters.Barcode.XDimension.Pixels = 3; // Height of 1D component generator.Parameters.Barcode.BarHeight.Pixels = 100; generator.Save("test.png"); } -
getCodablock
Codablock parameters.
-
getDataMatrix
DataMatrix parameters.
-
getCode16K
Code16K parameters.
-
getDotCode
DotCode parameters.
-
getITF
ITF parameters.
-
getPdf417
PDF417 parameters.
-
getQR
QR, MicroQR and RectMicroQR parameters.
-
getSupplement
Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN.
-
getMaxiCode
MaxiCode parameters.
-
getAztec
Aztec parameters.
-
getCode128
Code128 parameters.
-
getCodabar
Codabar parameters.
-
getCoupon
Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.
-
getHanXin
HanXin parameters.
-
getComplexBarcode
-
getAspectRatio
public final float getAspectRatio() -
hashCode
public int hashCode()
-