com.aspose.barcode.generation

Class BarcodeParameters

  • java.lang.Object
    • com.aspose.barcode.generation.BarcodeParameters


  • public class BarcodeParameters
    extends java.lang.Object

    Barcode generation parameters.

    • Method Detail

      • getBarcodeType

        @Deprecated
        public BaseEncodeType getBarcodeType()
        Deprecated. 
      • getCodeText

        public java.lang.String getCodeText()
      • setCodeText

        public void setCodeText(java.lang.String value)
      • getXDimension

        public Unit 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 AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

      • setXDimension

        public void setXDimension(Unit 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.

      • getBarHeight

        public Unit getBarHeight()

        Height of 1D barcodes' bars in Unit value. Ignored if AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

      • setBarHeight

        public void setBarHeight(Unit value)

        Height of 1D barcodes' bars in Unit value. Ignored if AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

      • getAutoSizeMode

        public AutoSizeMode getAutoSizeMode()

        Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.None.

      • setAutoSizeMode

        public void setAutoSizeMode(AutoSizeMode value)

        Specifies the different types of automatic sizing modes. Default value: AutoSizeMode.None.

      • getBarCodeHeight

        public Unit getBarCodeHeight()

        BarCode image height when AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

      • setBarCodeHeight

        public void setBarCodeHeight(Unit value)

        BarCode image height when AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

      • getBarCodeWidth

        public Unit getBarCodeWidth()

        BarCode image width when AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

      • setBarCodeWidth

        public void setBarCodeWidth(Unit value)

        BarCode image width when AutoSizeMode property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.

      • getForeColor

        public java.awt.Color getForeColor()

        Bars color. Default value: Color.Black.

      • setForeColor

        public void setForeColor(java.awt.Color value)

        Bars color. Default value: Color.Black.

      • getPadding

        public Padding getPadding()

        Barcode paddings. Default value: 5pt 5pt 5pt 5pt.

      • getChecksumAlwaysShow

        public boolean getChecksumAlwaysShow()

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

      • setChecksumAlwaysShow

        public void setChecksumAlwaysShow(boolean value)

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

      • isChecksumEnabled

        public EnableChecksum 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

        public void setChecksumEnabled(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

      • getEnableEscape

        public boolean getEnableEscape()

        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 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 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, Code39Extended, Code93Extended, Code16K, Code128 symbology if codetext is incorrect.

      • setThrowExceptionWhenCodeTextIncorrect

        public 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, Code39Extended, Code93Extended, Code16K, Code128 symbology if codetext is incorrect.

      • getWideNarrowRatio

        public 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, Code39Extended, Code39Standard

        Throws:
        java.lang.IllegalArgumentException - <p>The <b>WideNarrowRatio</b> parameter value is less than or equal to 0.</p>
      • setWideNarrowRatio

        public 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, Code39Extended, Code39Standard

        Throws:
        java.lang.IllegalArgumentException - <p>The <b>WideNarrowRatio</b> parameter value is less than or equal to 0.</p>
      • getCodeTextParameters

        public CodetextParameters getCodeTextParameters()

        Codetext parameters.

      • getFilledBars

        public boolean getFilledBars()

        Gets a value indicating whether bars filled. Only for 1D barcodes. Default value: true.

      • setFilledBars

        public void setFilledBars(boolean value)

        Sets a value indicating whether bars filled. Only for 1D barcodes. Default value: true.

      • getPostal

        public PostalParameters getPostal()

        Postal parameters. Used for Postnet, Planet.

      • getSupplement

        public SupplementParameters getSupplement()

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

      • getCoupon

        public CouponParameters getCoupon()

        Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.

      • getCalculatedBarCodeHeight

        @Deprecated
        public int getCalculatedBarCodeHeight()
        Deprecated. 
      • setCalculatedBarCodeHeight

        @Deprecated
        public void setCalculatedBarCodeHeight(int value)
        Deprecated. 
      • getCalculatedBarCodeWidth

        @Deprecated
        public int getCalculatedBarCodeWidth()
        Deprecated. 
      • setCalculatedBarCodeWidth

        @Deprecated
        public void setCalculatedBarCodeWidth(int value)
        Deprecated. 
      • getBackColor

        @Deprecated
        public java.awt.Color getBackColor()
        Deprecated. 
      • getResolution

        @Deprecated
        public float getResolution()
        Deprecated. 
      • getSupplementSpace

        @Deprecated
        public int getSupplementSpace()
        Deprecated. 
      • getPostalShortBarHeight

        @Deprecated
        public int getPostalShortBarHeight()
        Deprecated. 
      • getAspectRatio

        @Deprecated
        public float getAspectRatio()
        Deprecated. 
      • getColumns

        @Deprecated
        public int getColumns()
        Deprecated. 
      • getRows

        @Deprecated
        public int getRows()
        Deprecated. 
      • getQuietZonesWidthInXDim

        @Deprecated
        public int getQuietZonesWidthInXDim()
        Deprecated. 
      • getStateHash

        @Deprecated
        public int getStateHash()
        Deprecated.