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

      • 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

        @Deprecated
        public AutoSizeMode getAutoSizeMode()
        Deprecated. "This method is obsolete. Call BaseGenerationParameters.getAutoSizeMode() instead."

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

      • setAutoSizeMode

        @Deprecated
        public void setAutoSizeMode(AutoSizeMode value)
        Deprecated. "This method is obsolete. Call BaseGenerationParameters.setAutoSizeMode() instead."

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

      • getBarCodeHeight

        @Deprecated
        public Unit getBarCodeHeight()
        Deprecated. "This method is obsolete. Call BaseGenerationParameters.getImageHeight() instead."

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

      • setBarCodeHeight

        @Deprecated
        public void setBarCodeHeight(Unit value)
        Deprecated. "This method is obsolete. Call BaseGenerationParameters.setImageHeight() instead."

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

      • getBarCodeWidth

        @Deprecated
        public Unit getBarCodeWidth()
        Deprecated. "This method is obsolete. Call BaseGenerationParameters.getImageWidth() instead."

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

      • setBarCodeWidth

        @Deprecated
        public void setBarCodeWidth(Unit value)
        Deprecated. "This method is obsolete. Call BaseGenerationParameters.setImageWidth() instead."

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

      • getForeColor

        @Deprecated
        public java.awt.Color getForeColor()
        Deprecated. "This method is obsolete. Call BarcodeParameters.getBarColor() instead."

        Bars color. Default value: Color.Black.

      • setForeColor

        @Deprecated
        public void setForeColor(java.awt.Color value)
        Deprecated. "This method is obsolete. Call BarcodeParameters.setBarColor() instead."

        Bars color. Default value: Color.Black.

      • getBarColor

        public java.awt.Color getBarColor()

        Bars color. Default value: Color.Black.

      • setBarColor

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

      • 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.