com.aspose.barcode

Class BarCodeBuilder

  • java.lang.Object
    • com.aspose.barcode.BarCodeBuilder
  • All Implemented Interfaces:
    IBarCodeControl


    public class BarCodeBuilder
    extends java.lang.Object
    implements IBarCodeControl

    BarCodeBuilder for backend barcode images generation.

    supported symbology: 1D: Codabar, Code11, Code128, Code39Standard, Code39Extended Code93Standard, Code93Extended, EAN13, EAN8, Interleaved2of5, MSI, Standard2of5, UPCA, UPCE, ISBN, GS1Code128, Postnet, Planet EAN14, SCC14, SSCC18, ITF14, SingaporePost 2D: DataMatrix, PDf417, QR code


             Create and save a BarCode image
      
              BarCodeBuilder b = new BarCodeBuilder();
              b.setSymbologyType(Symbology.Codabar);
              b.setCodeText("12345678");
              b.save("test.bmp");
     

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      boolean pdf417Truncate 
    • Constructor Summary

      Constructors 
      Constructor and Description
      BarCodeBuilder()
      Initializes a new instance of the BarCodeBuilder class , default SymbologyType is Code128, default CodeText is 12345678.
      BarCodeBuilder(java.lang.String codeText)
      Initializes a new instance of the BarCodeBuilder} class with codetext , default SymbologyType is Code128.
      BarCodeBuilder(java.lang.String codeText, BaseEncodeType type)
      Initializes a new instance of the BarCodeBuilder class.
      BarCodeBuilder(java.lang.String codeText, long type)
      Initializes a new instance of the BarCodeBuilder class.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      protected void dispose(boolean disposing)
      Clean up any resources being used.
      boolean exportToXml(java.lang.String xmlFile)
      Exports BarCode properties to the xml-file specified
      java.awt.image.BufferedImage generateBarCodeImage()
      Generate the BarCode image under current settings
      boolean getAlwaysShowChecksum()
      Always display checksum digit in the humanreadable text for Code128 and GS1Code128 barcodes.
      float getAspectRatio()
      2D BarCode's module's height/width ratio (yDimension/xDimension).
      int getAustraliaPostFormatControlCode()
      Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"
      boolean getAutoSize()
      Adjusts the image's size automatically.
      int getAztecSymbolMode()
      Get a Aztec Symbol mode.
      java.lang.String getAztecSymbolModeName()
      Gets the name of stop symbol (character) of codabar symbology
      int getAztectErrorLevel()
      Level of error corection of Aztect types of barcode.
      java.awt.Color getBackColor()
      Background color of the barcode image
      java.lang.String getBackColorName()
      Gets a background color name of the barcode image
      java.awt.image.BufferedImage getBarCodeImage()
      Get the BarCode image under current settings
      float getBarHeight()
      height of 1D barcodes' bars.
      float getBarWidthReduction()
      Bar width reduction.
      java.awt.Color getBorderColor()
      BarCode Image's border's color See BorderWidth.
      java.lang.String getBorderColorName()
      Gets a barcode Image's border's color name
      int getBorderDashStyle()
      BarCode Image's border's style See BorderWidth.
      boolean getBorderVisible()
      Gets a value indicating whether [border visible].
      float getBorderWidth()
      BarCode Image's border's width Default Graphics Unit: Millimeter See BorderVisible.
      Caption getCaptionAbove()
      Get caption Above the BarCode image.
      Caption getCaptionBelow()
      Caption Below the BarCode image.
      int getCodabarChecksumMode()
      Get the checksum algorithm for Codabar barcodes.
      short getCodabarStartSymbol()
      Start symbol (character) of codabar symbology See CodabarStopSymbol}.
      java.lang.String getCodabarStartSymbolName()
      Gets the name of start symbol (character) of codabar symbology
      short getCodabarStopSymbol()
      Stop symbol (character) of codabar symbology See CodabarStartSymbol.
      java.lang.String getCodabarStopSymbolName()
      Gets the name of stop symbol (character) of codabar symbology
      int getCodeLocation()
      Specify the displaying CodeText's Location, set to CodeLocation.None to hide CodeText.
      java.lang.String getCodeLocationName()
      Gets a CodeLocation name
      java.lang.String getCodeText()
      Data to be encoded, different types of BarCode may have different CodeText length restrictions
      int getCodeTextAlignment()
      Gets the alignment of the code text.
      java.awt.Color getCodeTextColor()
      Specify the displaying CodeText's Color See System.Drawing.Color.
      java.lang.String getCodeTextColorName()
      Gets the CodeText's Color name
      java.nio.charset.Charset getCodeTextEncoding()
      Gets the encoding of codetext.
      java.awt.Font getCodeTextFont()
      Specify the displaying CodeText's font See CodeText.
      float getCodeTextSpace()
      Space between the CodeText and the BarCode.
      int getColumns()
      2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417, CodablockF
      int getCustomerInformationInterpretingType()
      Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other"
      java.awt.image.BufferedImage getCustomSizeBarCodeImage(java.awt.Dimension customBarCodeSize, boolean allowSpaceAround)
      Gets the scaled barcode image.
      java.awt.image.BufferedImage getCustomSizeBarCodeImage(float customBarCodeWidth, float customBarCodeHeight, boolean allowSpaceAround)
      Gets the scaled barcode image.
      int getDatamatrixEcc()
      Gets a Datamatri ECC type.
      int getDataMatrixEncodeMode()
      Encode mode of Datamatrix barcode, default to Auto
      java.lang.String getDisplay2DText()
      Gets the text will displayed on the barcode's image.
      int getDotCodeMask()
      Mask of Dotcode barcode, default to Auto
      int getECIEncoding() 
      int getEnableChecksum()
      EnableChecksum
      boolean getEnableEscape()
      Indicates whether explains the character "\" as an escape character in CodeText property.
      BaseEncodeType getEncodeType()
      Get BarCode's encode type (symbology).
      boolean getFilledBars()
      Only for 1D barcodes.
      java.awt.Color getForeColor()
      Foreground color of the barcode image, that is, Bar's color of 1D barcode, Module's color of 2D barcode See System.Drawing.Color.
      java.lang.String getForeColorName()
      Gets a foreground color name
      int getGraphicsUnit()
      Measurement of various properties such as width, height etc.
      java.lang.String getGraphicsUnitName() 
      float getImageHeight()
      BarCode image's height See AutoSize., if AutoSize is true, ImageHeight will be increased accordingly Default Graphics Unit: Millimeter
      int getImageQuality()
      Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias.
      java.lang.String getImageQualityName()
      Gets ImageQualityMode name
      float getImageWidth()
      BarCode image's width See AutoSize}., if AutoSize is true, IMAGE_WIDTH will be increased accordingly Default Graphics Unit: Millimeter
      float getITF14BorderThickness()
      Gets or sets an ITF14 border (bearer bar) thickness.
      int getITF14BorderType()
      Border type of ITF14 barcode, quiet zone will be determined by margin settings.
      int getMacroPdf417FileID()
      Gets macro pdf417 barcode's file ID.
      int getMacroPdf417SegmentID()
      Gets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
      int getMacroPdf417SegmentsCount()
      Gets macro pdf417 barcode segments count.
      MarginsF getMargins()
      Margin area around the core BarCode image If AutoSize is false, then width and height is fixed, thus Margins setting will be ignored Default Graphics Unit: Millimeter
      int getMaxiCodeEncodeMode()
      Gets or sets a MaxiCode encode mode
      java.awt.geom.Dimension2D getMinimumBarCodeSize()
      Returns the minimum width and height, in current GraphicsUnit, of this BarCode.
      java.awt.image.BufferedImage getOnlyBarCodeImage()
      Gets the only barcode image.
      java.awt.image.BufferedImage getOnlyBarCodeImage(int scaleFactor)
      Gets the only barcode image.
      int getPdf417CompactionMode()
      Pdf417 symbology type of BarCode's compaction mode, default compaction mode is Auto
      int getPdf417ErrorLevel()
      Gets Pdf417 symbology type of BarCode's error coccrection level ranging from level0 to level8, level0 means no error correction info, level8 means best error correction which means a larger picture
      boolean getPdf417Truncate()
      whether pdf417 symbology type of BarCode is truncated (to reduce space)
      float getPlanetShortBarHeight()
      Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
      float getPostnetShortBarHeight()
      Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch).
      java.lang.String getPrinterName()
      Choose printer, if not specified, Print() method will choose the first available printer
      int getQREncodeMode()
      QR symbology type of BarCode's encoding mode, default mode is Auto
      int getQREncodeType()
      QR / MicroQR selector mode.
      int getQRErrorLevel()
      Level of Reed-Solomon error correction for QR barcode.
      Resolution getResolution()
      Gets the resolution of the BarCode image See Resolution.
      float getRotationAngleF()
      BarCode image's rotation angle, measured in degree, e.g.
      int getRows()
      BarCode's rows, if setting is illegal then rows will be calculated automatically.
      java.lang.String getSupplementData()
      Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
      float getSupplementSpace()
      Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter See System.Drawing.GraphicsUnit.
      long getSymbologyType()
      Get BarCode's symbology, type Symbology.
      java.lang.String getSymbologyTypeName()
      Gets SymbologyType name
      int getTextRenderingHint()
      Specifies the quality of text rendering.
      boolean getThrowExceptionWhenCodeTextIncorrect()
      Only for 1D barcodes.
      float getWideNarrowRatio()
      Wide bars to Narrow bars ratio for some 1D BarCode.
      float getxDimension()
      x-dimension, smallest width unit of BarCode's bars or spaces.
      float getyDimension()
      y-dimension, smallest height unit of 2D BarCode's modules.
      static BarCodeBuilder importFromXml(java.lang.String xmlFile)
      Imports BarCode properties from the xml-file specified and applies them to the current BarCodeBuilder instance.
      static boolean isLicensed()
      Gets a value indicating whether generation module is licensed.
      boolean isOverridedDimensionX()
      Check if x dimension is specified by the user
      void print()
      Print BarCodeImage See PrinterName}.
      void rotate()
      Rotate barcode image clockwise for 90 degrees
      void rotate(float angle)
      Rotate barcode image clockwise
      void rotate(int direction, float angle)
      Rotate the barcode image
      void save(java.io.OutputStream stream, com.aspose.barcode.ImageFormat format)
      Save BarCodeImage to specific file in specific format
      void save(java.io.OutputStream stream, int format)
      Save BarCodeImage to stream in specific format
      void save(java.lang.String filename)
      Save BarCodeImage to specific file in specific format
      void save(java.lang.String filename, com.aspose.barcode.ImageFormat format)
      Save BarCodeImage to specific file in specific format
      void save(java.lang.String filename, int format)
      Save BarCodeImage to specific file in specific format
      void saveAsEmf(java.io.OutputStream stream)
      Deprecated. 
      void saveAsEmf(java.lang.String fileName)
      Deprecated. 
      void saveAsTiffInCMYK(java.lang.String filename)
      Deprecated. 
      void setAlwaysShowChecksum(boolean value)
      Always display checksum digit in the humanreadable text for Code128 and GS1Code128 barcodes.
      void setAspectRatio(float value)
      2D BarCode's module's height/width ratio (yDimension/xDimension).
      void setAustraliaPostFormatControlCode(int value)
      Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"
      void setAutoSize(boolean value)
      Adjusts the image's size automatically.
      void setAztecSymbolMode(int value)
      Set a Aztec Symbol mode.
      void setAztectErrorLevel(int value)
      Level of error corection of Aztect types of barcode.
      void setBackColor(java.awt.Color value)
      Background color of the barcode image See System.Drawing.Color.
      void setBarHeight(float value)
      height of 1D barcodes' bars.
      void setBarWidthReduction(float value)
      Bar width reduction.
      void setBinaryCodeText(byte[] codeText)
      Set the binary data to be encoded.
      void setBorderColor(java.awt.Color value)
      BarCode Image's border's color See BorderWidth.
      void setBorderDashStyle(int value)
      BarCode Image's border's style See BorderWidth.
      void setBorderVisible(boolean value)
      Sets a value indicating whether [border visible].
      void setBorderWidth(float value)
      BarCode Image's border's width Default Graphics Unit: Millimeter See BorderVisible.
      void setCaptionAbove(Caption value)
      Set Caption Above the BarCode image.
      void setCaptionBelow(Caption value)
      Caption Below the BarCode image.
      void setCodabarChecksumMode(int value)
      Set the checksum algorithm for Codabar barcodes.
      void setCodabarStartSymbol(short value)
      Start symbol (character) of codabar symbology See CodabarStopSymbol}.
      void setCodabarStopSymbol(short value)
      Stop symbol (character) of codabar symbology See CodabarStartSymbol.
      void setCodeLocation(int value)
      Specify the displaying CodeText's Location, set to CodeLocation.None to hide CodeText.
      void setCodeText(java.lang.String value)
      Set data to be encoded, different types of BarCode may have different CodeText length restrictions
      void setCodeTextAlignment(int value)
      Sets the alignment of the code text.
      void setCodeTextColor(java.awt.Color value)
      Specify the displaying CodeText's Color See System.Drawing.Color.
      void setCodeTextEncoding(java.nio.charset.Charset value)
      Sets the encoding of codetext.
      void setCodeTextFont(java.awt.Font value)
      Specify the displaying CodeText's font See CodeText.
      void setCodeTextSpace(float value)
      Space between the CodeText and the BarCode.
      void setColumns(int value)
      2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417
      void setCustomerInformationInterpretingType(int value)
      Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other"
      void setDatamatrixEcc(int value)
      Sets a Datamatri ECC type.
      void setDataMatrixEncodeMode(int value)
      Encode mode of Datamatrix barcode, default to Auto
      void setDisplay2DText(java.lang.String value)
      Sets the text will displayed on the barcode's image.
      void setDotCodeMask(int value)
      Mask of Dotcode barcode, default to Auto
      void setECIEncoding(int value)
      Extended Channel Interpretation Identifiers.
      void setEnableChecksum(int value)
      EnableChecksum
      void setEnableEscape(boolean value)
      Indicates whether explains the character "\" as an escape character in CodeText property.
      void setEncodeType(BaseEncodeType value)
      Set BarCode's encode type (symbology).
      void setFilledBars(boolean value)
      Only for 1D barcodes.
      void setForeColor(java.awt.Color value)
      Foreground color of the barcode image, that is, Bar's color of 1D barcode, Module's color of 2D barcode See System.Drawing.Color.
      void setGraphicsUnit(int value)
      Measurement of various properties such as width, height etc.
      void setImageHeight(float value)
      BarCode image's height See AutoSize., if AutoSize is true, ImageHeight will be increased accordingly Default Graphics Unit: Millimeter
      void setImageQuality(int value)
      Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias.
      void setImageWidth(float value)
      BarCode image's width See AutoSize}., if AutoSize is true, IMAGE_WIDTH will be increased accordingly Default Graphics Unit: Millimeter
      void setITF14BorderThickness(float value)
      Gets or sets an ITF14 border (bearer bar) thickness.
      void setITF14BorderType(int value)
      Border type of ITF14 barcode, quiet zone will be determined by margin settings.
      void setMacroPdf417FileID(int value)
      Sets macro pdf417 barcode's file ID.
      void setMacroPdf417SegmentID(int value)
      Sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
      void setMacroPdf417SegmentsCount(int value)
      Sets macro pdf417 barcode segments count.
      void setMargins(MarginsF value)
      Margin area around the core BarCode image If AutoSize is false, then width and height is fixed, thus Margins setting will be ignored Default Graphics Unit: Millimeter
      void setMaxiCodeEncodeMode(int value)
      Gets or sets a MaxiCode encode mode
      void setPdf417CompactionMode(int value)
      Pdf417 symbology type of BarCode's compaction mode, default compaction mode is Auto
      void setPdf417ErrorLevel(int value)
      Sets Pdf417 symbology type of BarCode's error coccrection level ranging from level0 to level8, level0 means no error correction info, level8 means best error correction which means a larger picture
      void setPdf417Truncate(boolean value)
      whether pdf417 symbology type of BarCode is truncated (to reduce space)
      void setPlanetShortBarHeight(float value)
      Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
      void setPostnetShortBarHeight(float value)
      Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch).
      void setPrinterName(java.lang.String value)
      Choose printer, if not specified, Print() method will choose the first available printer
      void setQREncodeMode(int value)
      QR symbology type of BarCode's encoding mode, default mode is Auto
      void setQREncodeType(int value) 
      void setQRErrorLevel(int value)
      Level of Reed-Solomon error correction for QR barcode.
      void setResolution(Resolution value)
      Sets the resolution of the BarCode image See Resolution.
      void setRotationAngleF(float value)
      BarCode image's rotation angle, measured in degree, e.g.
      void setRows(int value)
      BarCode's rows, if setting is illegal then rows will be calculated automatically.
      void setSupplementData(java.lang.String value)
      Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
      void setSupplementSpace(float value)
      Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter See System.Drawing.GraphicsUnit.
      void setSymbologyType(long value)
      Get BarCode's symbology, type Symbology.
      void setTextRenderingHint(int value)
      Specifies the quality of text rendering.
      void setThrowExceptionWhenCodeTextIncorrect(boolean value)
      Only for 1D barcodes.
      void setWideNarrowRatio(float value)
      Wide bars to Narrow bars ratio for some 1D BarCode.
      void setxDimension(float value)
      x-dimension, smallest width unit of BarCode's bars or spaces.
      void setyDimension(float value)
      y-dimension, smallest height unit of 2D BarCode's modules.
      java.lang.String toString()
      Overridden method representing BarCodeBuilder as a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • pdf417Truncate

        public boolean pdf417Truncate
    • Constructor Detail

      • BarCodeBuilder

        public BarCodeBuilder()

        Initializes a new instance of the BarCodeBuilder class , default SymbologyType is Code128, default CodeText is 12345678.

      • BarCodeBuilder

        public BarCodeBuilder(java.lang.String codeText)

        Initializes a new instance of the BarCodeBuilder} class with codetext , default SymbologyType is Code128.

        Parameters:
        codeText - string text data to be encoded
      • BarCodeBuilder

        public BarCodeBuilder(java.lang.String codeText,
                      long type)

        Initializes a new instance of the BarCodeBuilder class.

        Parameters:
        codeText - string text data to be encoded
        type - BarCode's type: Aspose.BarCode.SymbologyType
      • BarCodeBuilder

        public BarCodeBuilder(java.lang.String codeText,
                      BaseEncodeType type)

        Initializes a new instance of the BarCodeBuilder class.

        Parameters:
        codeText - string text data to be encoded
        type - BarCode's type: Aspose.BarCode.BaseEncodeType
    • Method Detail

      • isLicensed

        public static boolean isLicensed()

        Gets a value indicating whether generation module is licensed.

        Value: true if generation module is licensed; otherwise, false.
      • getEncodeType

        public BaseEncodeType getEncodeType()

        Get BarCode's encode type (symbology). Use EncodeTypes to set one of more than 64 symbologies: Code128, Code39, EAN13, EAN8, DataMatrix, Pdf417, QR, Aztec, MaxiCode, DotCode, Postnet, Planet, OneCode and other.

        Specified by:
        getEncodeType in interface IBarCodeControl
        Returns:
        returns BarCode's encode type
      • setEncodeType

        public void setEncodeType(BaseEncodeType value)

        Set BarCode's encode type (symbology). Use EncodeTypes to set one of more than 64 symbologies: Code128, Code39, EAN13, EAN8, DataMatrix, Pdf417, QR, Aztec, MaxiCode, DotCode, Postnet, Planet, OneCode and other.


          Creates and saves a BarCode image
          
                  BarCodeBuilder barCodeBuilder = new BarCodeBuilder();
            barCodeBuilder.setEncodeType(EncodeTypes.CODABAR);
            barCodeBuilder.setCodeText("12345678");
            barCodeBuilder.save("test.bmp");
                  

        Specified by:
        setEncodeType in interface IBarCodeControl
      • getSymbologyType

        public long getSymbologyType()

        Get BarCode's symbology, type Symbology. Supported symbology: 1D: Codabar, Code11, Code128, Code39Standard, Code39Extended Code93Standard, Code93Extended, EAN13, EAN8, Interleaved2of5, MSI, Standard2of5, UPCA, UPCE, EAN14, SCC14, SSCC18, ITF14, OneCode, SingaporePost 2D: DataMatrix, PDf417,MacroPDF

        Specified by:
        getSymbologyType in interface IBarCodeControl
      • getSymbologyTypeName

        public java.lang.String getSymbologyTypeName()

        Gets SymbologyType name

        Returns:

      • setSymbologyType

        public void setSymbologyType(long value)

        Get BarCode's symbology, type Symbology. Supported symbology: 1D: Codabar, Code11, Code128, Code39Standard, Code39Extended Code93Standard, Code93Extended, EAN13, EAN8, Interleaved2of5, MSI, Standard2of5, UPCA, UPCE, EAN14, SCC14, SSCC18, ITF14, OneCode, SingaporePost 2D: DataMatrix, PDf417,MacroPDF


          Create and save a BarCode image
          
                  BarCodeBuilder b = new BarCodeBuilder();
                  b.setSymbologyType(Symbology.Codabar);
                  b.setCodeText("12345678");
                  b.save("test.bmp");
                  

        Specified by:
        setSymbologyType in interface IBarCodeControl
      • getCodeText

        public java.lang.String getCodeText()

        Data to be encoded, different types of BarCode may have different CodeText length restrictions

        Specified by:
        getCodeText in interface IBarCodeControl
      • setCodeText

        public void setCodeText(java.lang.String value)

        Set data to be encoded, different types of BarCode may have different CodeText length restrictions


          Create and save a BarCode image
          
                  BarCodeBuilder b = new BarCodeBuilder();
                  b.setSymbologyType(Symbology.Codabar);
                  b.setCodeText("12345678");
                  b.save("test.bmp");
                  

        Specified by:
        setCodeText in interface IBarCodeControl
      • setBinaryCodeText

        public void setBinaryCodeText(byte[] codeText)

        Set the binary data to be encoded.

        Parameters:
        codeText - The binary data to be encoded.
      • getDisplay2DText

        public java.lang.String getDisplay2DText()

        Gets the text will displayed on the barcode's image. Available only for 2D barcodes. Limited to 1000 chars.

        Value: The text to display.
        Specified by:
        getDisplay2DText in interface IBarCodeControl
      • setDisplay2DText

        public void setDisplay2DText(java.lang.String value)

        Sets the text will displayed on the barcode's image. Available only for 2D barcodes. Limited to 1000 chars.

        Value: The text to display.
        Specified by:
        setDisplay2DText in interface IBarCodeControl
      • getCodeTextEncoding

        public java.nio.charset.Charset getCodeTextEncoding()

        Gets the encoding of codetext.

        Value: The encoding for codetext.
      • setCodeTextEncoding

        public void setCodeTextEncoding(java.nio.charset.Charset value)

        Sets the encoding of codetext.

        Value: The encoding for codetext.
      • getEnableEscape

        public boolean getEnableEscape()

        Indicates whether explains the character "\" as an escape character in CodeText property. It is worked pdf417, DataMatrix, Code128 only See CodeText. <note>If the EnableEscape is true, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters.</note>


        Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \CR stands for CR.

        Specified by:
        getEnableEscape in interface IBarCodeControl
      • setEnableEscape

        public void setEnableEscape(boolean value)

        Indicates whether explains the character "\" as an escape character in CodeText property. It is worked pdf417, DataMatrix, Code128 only See CodeText. <note>If the EnableEscape is true, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters.</note>


        Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \CR stands for CR.

        Specified by:
        setEnableEscape in interface IBarCodeControl
      • getCodeTextFont

        public java.awt.Font getCodeTextFont()

        Specify the displaying CodeText's font See CodeText. See System.Drawing.Font. See CodeTextColor. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.

        Specified by:
        getCodeTextFont in interface IBarCodeControl
        Returns:
        CodeTextFont
      • setCodeTextFont

        public void setCodeTextFont(java.awt.Font value)

        Specify the displaying CodeText's font See CodeText. See System.Drawing.Font. See CodeTextColor. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.

        Specified by:
        setCodeTextFont in interface IBarCodeControl
        Parameters:
        value - CodeTextFont
      • getCodeTextColor

        public java.awt.Color getCodeTextColor()

        Specify the displaying CodeText's Color See System.Drawing.Color. See CodeText. See CodeTextFont. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.

        Specified by:
        getCodeTextColor in interface IBarCodeControl
      • getCodeTextColorName

        public java.lang.String getCodeTextColorName()

        Gets the CodeText's Color name

        Returns:
        CodeText's Color name

      • setCodeTextColor

        public void setCodeTextColor(java.awt.Color value)

        Specify the displaying CodeText's Color See System.Drawing.Color. See CodeText. See CodeTextFont. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.

        Specified by:
        setCodeTextColor in interface IBarCodeControl
      • getCodeLocation

        public int getCodeLocation()

        Specify the displaying CodeText's Location, set to CodeLocation.None to hide CodeText. CodeLocation will be ignored if SymbologyType is UPCE, UPCA, ISBN, EAN8 or EAN13 See CodeText. See CodeTextFont. See CodeTextSpace. See CodeTextColor See CodeTextAlignment.

        Specified by:
        getCodeLocation in interface IBarCodeControl
      • getCodeLocationName

        public java.lang.String getCodeLocationName()

        Gets a CodeLocation name

      • setCodeLocation

        public void setCodeLocation(int value)

        Specify the displaying CodeText's Location, set to CodeLocation.None to hide CodeText. CodeLocation will be ignored if SymbologyType is UPCE, UPCA, ISBN, EAN8 or EAN13 See CodeText. See CodeTextFont. See CodeTextSpace. See CodeTextColor See CodeTextAlignment.

        Specified by:
        setCodeLocation in interface IBarCodeControl
      • getCodeTextAlignment

        public int getCodeTextAlignment()

        Gets the alignment of the code text. See System.Drawing.StringAlignment. See CodeText. See CodeTextFont. See CodeTextColor. See CodeTextSpace.


        StringAlignment.Near means CodeText will be aligned to the left StringAlignment.Far means CodeText will be aligned to the right StringAlignment.Center means CodeText will be aligned to the center

        Specified by:
        getCodeTextAlignment in interface IBarCodeControl
      • setCodeTextAlignment

        public void setCodeTextAlignment(int value)

        Sets the alignment of the code text. See System.Drawing.StringAlignment. See CodeText. See CodeTextFont. See CodeTextColor. See CodeTextSpace.


        StringAlignment.Near means CodeText will be aligned to the left StringAlignment.Far means CodeText will be aligned to the right StringAlignment.Center means CodeText will be aligned to the center

        Specified by:
        setCodeTextAlignment in interface IBarCodeControl
      • getRotationAngleF

        public float getRotationAngleF()

        BarCode image's rotation angle, measured in degree, e.g. RotationAngleF = 0 or RotationAngleF = 360 means no rotation If RotationAngleF NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image, please set quality mode to anti-alias

        Specified by:
        getRotationAngleF in interface IBarCodeControl
      • setRotationAngleF

        public void setRotationAngleF(float value)

        BarCode image's rotation angle, measured in degree, e.g. RotationAngleF = 0 or RotationAngleF = 360 means no rotation If RotationAngleF NOT equal to 90, 180, 270 or 0, it may increase the difficulty for the scanner to read the image, please set quality mode to anti-alias

        Specified by:
        setRotationAngleF in interface IBarCodeControl
      • getGraphicsUnit

        public int getGraphicsUnit()

        Measurement of various properties such as width, height etc. Default GraphicsUnit: Millimeter

        Specified by:
        getGraphicsUnit in interface IBarCodeControl
      • getGraphicsUnitName

        public java.lang.String getGraphicsUnitName()
      • setGraphicsUnit

        public void setGraphicsUnit(int value)

        Measurement of various properties such as width, height etc. Default GraphicsUnit: Millimeter See System.Drawing.GraphicsUnit.

        Specified by:
        setGraphicsUnit in interface IBarCodeControl
      • getPrinterName

        public java.lang.String getPrinterName()

        Choose printer, if not specified, Print() method will choose the first available printer

      • setPrinterName

        public void setPrinterName(java.lang.String value)

        Choose printer, if not specified, Print() method will choose the first available printer

      • getImageQuality

        public int getImageQuality()

        Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias. Type: Aspose.BarCode.ImageQualityMode See ImageQualityMode.

        Specified by:
        getImageQuality in interface IBarCodeControl
      • getImageQualityName

        public java.lang.String getImageQualityName()

        Gets ImageQualityMode name

        Returns:

      • setImageQuality

        public void setImageQuality(int value)

        Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias. Type: Aspose.BarCode.ImageQualityMode See ImageQualityMode.

        Specified by:
        setImageQuality in interface IBarCodeControl
      • setTextRenderingHint

        public void setTextRenderingHint(int value)

        Specifies the quality of text rendering.

        Specified by:
        setTextRenderingHint in interface IBarCodeControl
      • getAutoSize

        public boolean getAutoSize()

        Adjusts the image's size automatically. Recommended: true. Default value is true.

        Specified by:
        getAutoSize in interface IBarCodeControl
      • setAutoSize

        public void setAutoSize(boolean value)

        Adjusts the image's size automatically. Recommended: true. Default value is true.

        Specified by:
        setAutoSize in interface IBarCodeControl
      • getImageWidth

        public float getImageWidth()

        BarCode image's width See AutoSize}., if AutoSize is true, IMAGE_WIDTH will be increased accordingly Default Graphics Unit: Millimeter

        Specified by:
        getImageWidth in interface IBarCodeControl
      • setImageWidth

        public void setImageWidth(float value)

        BarCode image's width See AutoSize}., if AutoSize is true, IMAGE_WIDTH will be increased accordingly Default Graphics Unit: Millimeter

        Specified by:
        setImageWidth in interface IBarCodeControl
      • getImageHeight

        public float getImageHeight()

        BarCode image's height See AutoSize., if AutoSize is true, ImageHeight will be increased accordingly Default Graphics Unit: Millimeter

        Specified by:
        getImageHeight in interface IBarCodeControl
      • setImageHeight

        public void setImageHeight(float value)

        BarCode image's height See AutoSize., if AutoSize is true, ImageHeight will be increased accordingly Default Graphics Unit: Millimeter

        Specified by:
        setImageHeight in interface IBarCodeControl
      • getBorderWidth

        public float getBorderWidth()

        BarCode Image's border's width Default Graphics Unit: Millimeter See BorderVisible. See BorderDashStyle. See BorderColor.

        Specified by:
        getBorderWidth in interface IBarCodeControl
      • setBorderWidth

        public void setBorderWidth(float value)

        BarCode Image's border's width Default Graphics Unit: Millimeter See BorderVisible. See BorderDashStyle. See BorderColor.

        Specified by:
        setBorderWidth in interface IBarCodeControl
      • getxDimension

        public float getxDimension()

        x-dimension, smallest width unit of BarCode's bars or spaces. increase this will increase the whole barcode image's width if AutoSize is true Default Graphics Unit: Millimeter See yDimension. See AutoSize. See BarHeight.

        Specified by:
        getxDimension in interface IBarCodeControl
      • setxDimension

        public void setxDimension(float value)

        x-dimension, smallest width unit of BarCode's bars or spaces. increase this will increase the whole barcode image's width if AutoSize is true Default Graphics Unit: Millimeter See yDimension. See AutoSize. See BarHeight.

        Specified by:
        setxDimension in interface IBarCodeControl
      • getyDimension

        public float getyDimension()

        y-dimension, smallest height unit of 2D BarCode's modules. Some square symbols (such as DataMatrix) may ignore this and use x-dimension for both width unit and height unit In 2D barcode, y-dimension * rows determines BarCode's height In 1D barcode, BarHeight determines BarCode's height. Default Graphics Unit: Millimeter See xDimension. See BarHeight.

        Specified by:
        getyDimension in interface IBarCodeControl
      • setyDimension

        public void setyDimension(float value)

        y-dimension, smallest height unit of 2D BarCode's modules. Some square symbols (such as DataMatrix) may ignore this and use x-dimension for both width unit and height unit In 2D barcode, y-dimension * rows determines BarCode's height In 1D barcode, BarHeight determines BarCode's height. Default Graphics Unit: Millimeter See xDimension. See BarHeight.

        Specified by:
        setyDimension in interface IBarCodeControl
      • getBarHeight

        public float getBarHeight()

        height of 1D barcodes' bars. In 2D barcode, y-dimension * rows determines BarCode's height In 1D barcode, BarHeight determines BarCode's height. Default Graphics Unit: Millimeter See yDimension.

        Specified by:
        getBarHeight in interface IBarCodeControl
      • setBarHeight

        public void setBarHeight(float value)

        height of 1D barcodes' bars. In 2D barcode, y-dimension * rows determines BarCode's height In 1D barcode, BarHeight determines BarCode's height. Default Graphics Unit: Millimeter See yDimension.

        Specified by:
        setBarHeight in interface IBarCodeControl
      • getAspectRatio

        public float getAspectRatio()

        2D BarCode's module's height/width ratio (yDimension/xDimension). calculated based on xDimension set to 0 means not using this feature. See xDimension. See yDimension.


        Some 2D BarCodes are square shaped, then AspectRatio is not appliable

        Specified by:
        getAspectRatio in interface IBarCodeControl
      • setAspectRatio

        public void setAspectRatio(float value)

        2D BarCode's module's height/width ratio (yDimension/xDimension). calculated based on xDimension set to 0 means not using this feature. See xDimension. See yDimension.


        Some 2D BarCodes are square shaped, then AspectRatio is not appliable

        Specified by:
        setAspectRatio in interface IBarCodeControl
      • getMargins

        public MarginsF getMargins()

        Margin area around the core BarCode image If AutoSize is false, then width and height is fixed, thus Margins setting will be ignored Default Graphics Unit: Millimeter

        Specified by:
        getMargins in interface IBarCodeControl
      • setMargins

        public void setMargins(MarginsF value)

        Margin area around the core BarCode image If AutoSize is false, then width and height is fixed, thus Margins setting will be ignored Default Graphics Unit: Millimeter

      • getSupplementSpace

        public float getSupplementSpace()

        Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter See System.Drawing.GraphicsUnit. See SupplementData.

        Specified by:
        getSupplementSpace in interface IBarCodeControl
      • setSupplementSpace

        public void setSupplementSpace(float value)

        Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter See System.Drawing.GraphicsUnit. See SupplementData.

        Specified by:
        setSupplementSpace in interface IBarCodeControl
      • getPostnetShortBarHeight

        public float getPostnetShortBarHeight()

        Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch). To set up tall bar's height, see BarHeight, which has to be between 8.28 milimeter and 9.72 milimeter (0.115 inch and 0.135 inch) see changing See System.Drawing.GraphicsUnitGraphicsUnit. see setting tall bar's height: See BarHeightBarHeight.

        Specified by:
        getPostnetShortBarHeight in interface IBarCodeControl
      • setPostnetShortBarHeight

        public void setPostnetShortBarHeight(float value)

        Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch). To set up tall bar's height, see BarHeight, which has to be between 8.28 milimeter and 9.72 milimeter (0.115 inch and 0.135 inch) see changing See System.Drawing.GraphicsUnitGraphicsUnit. see setting tall bar's height: See BarHeightBarHeight.

        Specified by:
        setPostnetShortBarHeight in interface IBarCodeControl
      • getPlanetShortBarHeight

        public float getPlanetShortBarHeight()

        Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters. see changing See System.Drawing.GraphicsUnitGraphicsUnit. see setting tall bar's height: See BarHeightBarHeight.

        Specified by:
        getPlanetShortBarHeight in interface IBarCodeControl
      • setPlanetShortBarHeight

        public void setPlanetShortBarHeight(float value)

        Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters. see changing See System.Drawing.GraphicsUnitGraphicsUnit. see setting tall bar's height: See BarHeightBarHeight.

        Specified by:
        setPlanetShortBarHeight in interface IBarCodeControl
      • getCodeTextSpace

        public float getCodeTextSpace()

        Space between the CodeText and the BarCode. Default Graphics Unit: Millimeter See CodeText. See CodeLocation. See CodeTextFont. See CodeTextColor. See CodeTextAlignment.

        Specified by:
        getCodeTextSpace in interface IBarCodeControl
      • setCodeTextSpace

        public void setCodeTextSpace(float value)

        Space between the CodeText and the BarCode. Default Graphics Unit: Millimeter See CodeText. See CodeLocation. See CodeTextFont. See CodeTextColor. See CodeTextAlignment.

        Specified by:
        setCodeTextSpace in interface IBarCodeControl
      • getBarCodeImage

        public java.awt.image.BufferedImage getBarCodeImage()

        Get the BarCode image under current settings

        Specified by:
        getBarCodeImage in interface IBarCodeControl
      • getBorderVisible

        public boolean getBorderVisible()

        Gets a value indicating whether [border visible].

        Specified by:
        getBorderVisible in interface IBarCodeControl
        Returns:
        true if [border visible]; otherwise, false.
      • setBorderVisible

        public void setBorderVisible(boolean value)

        Sets a value indicating whether [border visible].

        Specified by:
        setBorderVisible in interface IBarCodeControl
        Parameters:
        value - is true if [border visible]; otherwise, false}.
      • getBorderColor

        public java.awt.Color getBorderColor()

        BarCode Image's border's color See BorderWidth. See BorderVisible. See BorderDashStyle

        Specified by:
        getBorderColor in interface IBarCodeControl
        Returns:
        borderColor
      • getBorderColorName

        public java.lang.String getBorderColorName()

        Gets a barcode Image's border's color name

      • setBorderColor

        public void setBorderColor(java.awt.Color value)

        BarCode Image's border's color See BorderWidth. See BorderVisible. See BorderDashStyle

        Specified by:
        setBorderColor in interface IBarCodeControl
      • getBorderDashStyle

        public int getBorderDashStyle()

        BarCode Image's border's style See BorderWidth. See BorderVisible. See BorderColor

        Specified by:
        getBorderDashStyle in interface IBarCodeControl
      • setBorderDashStyle

        public void setBorderDashStyle(int value)

        BarCode Image's border's style See BorderWidth. See BorderVisible. See BorderColor

        Specified by:
        setBorderDashStyle in interface IBarCodeControl
      • getCodabarStartSymbol

        public short getCodabarStartSymbol()

        Start symbol (character) of codabar symbology See CodabarStopSymbol}.


                com.aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder();
          b.setSymbologyType(Aspose.BarCode.SymbologyType.Codabar);
          b.setCodabarStartSymbol(CodabarSymbol.A);
          b.setCodabarStopSymbol(CodabarSymbol.B);
          b.setCodeText("123456");
          

        Specified by:
        getCodabarStartSymbol in interface IBarCodeControl
      • getCodabarStartSymbolName

        public java.lang.String getCodabarStartSymbolName()

        Gets the name of start symbol (character) of codabar symbology

      • getCodabarStopSymbolName

        public java.lang.String getCodabarStopSymbolName()

        Gets the name of stop symbol (character) of codabar symbology

      • setCodabarStartSymbol

        public void setCodabarStartSymbol(short value)

        Start symbol (character) of codabar symbology See CodabarStopSymbol}.


                 
                 com.aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder();
          b.setSymbologyType(Aspose.BarCode.SymbologyType.Codabar);
          b.setCodabarStartSymbol(CodabarSymbol.A);
          b.setCodabarStopSymbol(CodabarSymbol.B);
          b.setCodeText("123456");
                 

        Specified by:
        setCodabarStartSymbol in interface IBarCodeControl
      • getCodabarStopSymbol

        public short getCodabarStopSymbol()

        Stop symbol (character) of codabar symbology See CodabarStartSymbol.


                 
                com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
          b.setSymbologyType(Aspose.BarCode.SymbologyType.Codabar);
          b.setCodabarStartSymbol(CodabarSymbol.A);
          b.setCodabarStopSymbol(CodabarSymbol.B);
          b.setCodeText("123456");
                 

        Specified by:
        getCodabarStopSymbol in interface IBarCodeControl
      • setCodabarStopSymbol

        public void setCodabarStopSymbol(short value)

        Stop symbol (character) of codabar symbology See CodabarStartSymbol.


                 
                com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
          b.setSymbologyType(Aspose.BarCode.SymbologyType.Codabar);
          b.setCodabarStartSymbol(CodabarSymbol.A);
          b.setCodabarStopSymbol(CodabarSymbol.B);
          b.setCodeText("123456");
                 

        Specified by:
        setCodabarStopSymbol in interface IBarCodeControl
      • getCodabarChecksumMode

        public int getCodabarChecksumMode()

        Get the checksum algorithm for Codabar barcodes. Default value is CodabarChecksum.Mod16. To enable checksum calculation set value EnableChecksum.Yes to property EnableChecksum.

      • setCodabarChecksumMode

        public void setCodabarChecksumMode(int value)

        Set the checksum algorithm for Codabar barcodes. Default value is CodabarChecksum.Mod16. To enable checksum calculation set value EnableChecksum.Yes to property EnableChecksum.


                
                [Java]
                BarCodeBuilder b = new BarCodeBuilder();
          b.setSymbologyType(Symbology.CODABAR);
          b.setEnableChecksum(EnableChecksum.Yes);
          b.setCodabarChecksumMode(CodabarChecksum.Mod10);
          b.setCodeText("0123456789");
                

      • getAustraliaPostFormatControlCode

        public int getAustraliaPostFormatControlCode()

        Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"

        Specified by:
        getAustraliaPostFormatControlCode in interface IBarCodeControl
      • setAustraliaPostFormatControlCode

        public void setAustraliaPostFormatControlCode(int value)

        Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"


                BarCodeBuilder b = new BarCodeBuilder();
          b.setSymbologyType(SymbologyType.AustraliaPost);
          b.setAustraliaPostFormatControlCode(AustraliaPostFormatControlCode.Standard);
          b.setCodeText("12345678");
          

        Specified by:
        setAustraliaPostFormatControlCode in interface IBarCodeControl
      • getCustomerInformationInterpretingType

        public int getCustomerInformationInterpretingType()

        Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other"

      • setCustomerInformationInterpretingType

        public void setCustomerInformationInterpretingType(int value)

        Interpreting type for the Customer Information of AustralianPost, default to CustomerInformationInterpretingType.Other"


                 BarCodeBuilder b = new BarCodeBuilder();
           b.setSymbologyType(Symbology.AustraliaPost);
           b.setCustomerInformationInterpretingType(CustomerInformationInterpretingType.CTable);
           b.setCodeText("5912345678ABCde");
          

      • getITF14BorderType

        public int getITF14BorderType()

        Border type of ITF14 barcode, quiet zone will be determined by margin settings.

      • setITF14BorderType

        public void setITF14BorderType(int value)

        Border type of ITF14 barcode, quiet zone will be determined by margin settings.

      • getITF14BorderThickness

        public float getITF14BorderThickness()

        Gets or sets an ITF14 border (bearer bar) thickness. Default value is -1, this means that the thickness is calculated automatically

      • setITF14BorderThickness

        public void setITF14BorderThickness(float value)

        Gets or sets an ITF14 border (bearer bar) thickness. Default value is -1, this means that the thickness is calculated automatically

      • getForeColor

        public java.awt.Color getForeColor()

        Foreground color of the barcode image, that is, Bar's color of 1D barcode, Module's color of 2D barcode See System.Drawing.Color.

        Specified by:
        getForeColor in interface IBarCodeControl
      • getForeColorName

        public java.lang.String getForeColorName()
        Gets a foreground color name
        Returns:
        foreground color name
      • setForeColor

        public void setForeColor(java.awt.Color value)

        Foreground color of the barcode image, that is, Bar's color of 1D barcode, Module's color of 2D barcode See System.Drawing.Color.

        Specified by:
        setForeColor in interface IBarCodeControl
      • getBackColor

        public java.awt.Color getBackColor()

        Background color of the barcode image

        Specified by:
        getBackColor in interface IBarCodeControl
      • getBackColorName

        public java.lang.String getBackColorName()

        Gets a background color name of the barcode image

      • setBackColor

        public void setBackColor(java.awt.Color value)

        Background color of the barcode image See System.Drawing.Color.

        Specified by:
        setBackColor in interface IBarCodeControl
      • getThrowExceptionWhenCodeTextIncorrect

        public boolean getThrowExceptionWhenCodeTextIncorrect()

        Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Overwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbologies if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39Extended, Code93Extended, Code16K, Code128 symbologies 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. Overwise codetext will be corrected to match barcode's specification. Exception always will be thrown for: Databar symbologies if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39Extended, Code93Extended, Code16K, Code128 symbologies if codetext is incorrect.

      • getColumns

        public int getColumns()

        2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417, CodablockF

        Specified by:
        getColumns in interface IBarCodeControl
      • setColumns

        public void setColumns(int value)

        2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417

        Specified by:
        setColumns in interface IBarCodeControl
      • getRows

        public int getRows()

        BarCode's rows, if setting is illegal then rows will be calculated automatically. Applicable Symbology: Pdf417, DatabarExpandedStacked

      • setRows

        public void setRows(int value)

        BarCode's rows, if setting is illegal then rows will be calculated automatically. Applicable Symbology: Pdf417, DatabarExpandedStacked

      • getDataMatrixEncodeMode

        public int getDataMatrixEncodeMode()

        Encode mode of Datamatrix barcode, default to Auto

      • setDataMatrixEncodeMode

        public void setDataMatrixEncodeMode(int value)

        Encode mode of Datamatrix barcode, default to Auto

      • getPdf417CompactionMode

        public int getPdf417CompactionMode()

        Pdf417 symbology type of BarCode's compaction mode, default compaction mode is Auto

        Specified by:
        getPdf417CompactionMode in interface IBarCodeControl
      • setPdf417CompactionMode

        public void setPdf417CompactionMode(int value)

        Pdf417 symbology type of BarCode's compaction mode, default compaction mode is Auto

        Specified by:
        setPdf417CompactionMode in interface IBarCodeControl
      • getPdf417Truncate

        public boolean getPdf417Truncate()

        whether pdf417 symbology type of BarCode is truncated (to reduce space)

        Specified by:
        getPdf417Truncate in interface IBarCodeControl
      • setPdf417Truncate

        public void setPdf417Truncate(boolean value)

        whether pdf417 symbology type of BarCode is truncated (to reduce space)

        Specified by:
        setPdf417Truncate in interface IBarCodeControl
      • getPdf417ErrorLevel

        public int getPdf417ErrorLevel()

        Gets Pdf417 symbology type of BarCode's error coccrection level ranging from level0 to level8, level0 means no error correction info, level8 means best error correction which means a larger picture

        Specified by:
        getPdf417ErrorLevel in interface IBarCodeControl
      • setPdf417ErrorLevel

        public void setPdf417ErrorLevel(int value)

        Sets Pdf417 symbology type of BarCode's error coccrection level ranging from level0 to level8, level0 means no error correction info, level8 means best error correction which means a larger picture

        Specified by:
        setPdf417ErrorLevel in interface IBarCodeControl
      • getMacroPdf417SegmentsCount

        public int getMacroPdf417SegmentsCount()

        Gets macro pdf417 barcode segments count.

      • setMacroPdf417SegmentsCount

        public void setMacroPdf417SegmentsCount(int value)

        Sets macro pdf417 barcode segments count.

      • getMacroPdf417SegmentID

        public int getMacroPdf417SegmentID()

        Gets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.

      • setMacroPdf417SegmentID

        public void setMacroPdf417SegmentID(int value)

        Sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.

      • getMacroPdf417FileID

        public int getMacroPdf417FileID()

        Gets macro pdf417 barcode's file ID.

      • setMacroPdf417FileID

        public void setMacroPdf417FileID(int value)

        Sets macro pdf417 barcode's file ID.

      • getWideNarrowRatio

        public float getWideNarrowRatio()

        Wide bars to Narrow bars ratio for some 1D BarCode. Default WideNarrowRatio:3, that is, wide bars are 3 times as wide as narrow bars Appliable symbology: Code39Extended, Code39Standard, Standard2of5, Interleaved2of5, Pharmacode

        Specified by:
        getWideNarrowRatio in interface IBarCodeControl
      • setWideNarrowRatio

        public void setWideNarrowRatio(float value)

        Wide bars to Narrow bars ratio for some 1D BarCode. Default WideNarrowRatio:3, that is, wide bars are 3 times as wide as narrow bars Appliable symbology: Code39Extended, Code39Standard, Standard2of5, Interleaved2of5, Pharmacode

        Specified by:
        setWideNarrowRatio in interface IBarCodeControl
      • getSupplementData

        public java.lang.String getSupplementData()

        Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5. See SUPPLEMENT_SPACE.


         
         com.aspose.barcode.BarCodeBuilder b;
         b = new BarCodeBuilder();
         b.setSymbologyType(SymbologyType.UPCE);
         b.setCodeText("123456");
         b.setSupplementData("11");
         b.save("tmp.bmp");
         

        Specified by:
        getSupplementData in interface IBarCodeControl
      • setSupplementData

        public void setSupplementData(java.lang.String value)

        Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5. See SUPPLEMENT_SPACE.


         
         com.aspose.barcode.BarCodeBuilder b;
         b = new BarCodeBuilder();
         b.setSymbologyType(SymbologyType.UPCE);
         b.setCodeText("123456");
         b.setSupplementData("11");
         b.save("tmp.bmp");
         

        Specified by:
        setSupplementData in interface IBarCodeControl
      • getQRErrorLevel

        public int getQRErrorLevel()

        Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see QRErrorLevel.

      • setQRErrorLevel

        public void setQRErrorLevel(int value)

        Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see QRErrorLevel.

      • getQREncodeMode

        public int getQREncodeMode()

        QR symbology type of BarCode's encoding mode, default mode is Auto

      • setQREncodeMode

        public void setQREncodeMode(int value)

        QR symbology type of BarCode's encoding mode, default mode is Auto

      • getQREncodeType

        public int getQREncodeType()

        QR / MicroQR selector mode. Select ForceQR for standard QR symbols, Auto for MicroQR.


         Example how to encode MicroQR
         
         BarCodeBuilder builder = new BarCodeBuilder();
         builder.setSymbologyType(Symbology.QR);
         builder.setQREncodeMode(QREncodeMode.Auto);
         builder.setQREncodeType(QREncodeType.Auto);
         builder.setCodeText("12345TEXT");
         builder.setQRErrorLevel(QRErrorLevel.LevelL);
         BufferedImage lBmp = builder.generateBarCodeImage();
         
        Example how to encode QR
         BarCodeBuilder builder = new BarCodeBuilder();
         builder.setSymbologyType(Symbology.QR);
         builder.setQREncodeMode(QREncodeMode.Auto);
         builder.setQREncodeType(QREncodeType.ForceQR);
         builder.setCodeText("12345TEXT");
         builder.setQRErrorLevel(QRErrorLevel.LevelL);
         BufferedImage lBmp = builder.generateBarCodeImage();
         

      • setQREncodeType

        public void setQREncodeType(int value)
      • getECIEncoding

        public int getECIEncoding()
      • setECIEncoding

        public void setECIEncoding(int value)

        Extended Channel Interpretation Identifiers. It is used to tell the barcode reader details about the used references for encoding the data in the symbol. Current implementation consists all well known charset encodings. Currently, it is used only for QR 2D barcode.


         Example how to use ECI encoding
         
         BarCodeBuilder builder = new BarCodeBuilder();
         builder.setSymbologyType(Symbology.QR);
         builder.setQREncodeMode(QREncodeMode.ECIEncoding);
         builder.setQREncodeType(QREncodeType.ForceQR);
         builder.setECIEncoding(ECIEncodings.UTF8);
         builder.setCodeText("12345TEXT");
         builder.setQRErrorLevel(QRErrorLevel.LevelL);
         Bitmap lBmp = builder.generateBarCodeImage();
         

      • getMaxiCodeEncodeMode

        public int getMaxiCodeEncodeMode()

        Gets or sets a MaxiCode encode mode

      • setMaxiCodeEncodeMode

        public void setMaxiCodeEncodeMode(int value)

        Gets or sets a MaxiCode encode mode

      • getAztectErrorLevel

        public int getAztectErrorLevel()

        Level of error corection of Aztect types of barcode. value should between 10 to 95

      • setAztectErrorLevel

        public void setAztectErrorLevel(int value)

        Level of error corection of Aztect types of barcode. value should between 10 to 95

      • getDotCodeMask

        public int getDotCodeMask()

        Mask of Dotcode barcode, default to Auto

      • setDotCodeMask

        public void setDotCodeMask(int value)

        Mask of Dotcode barcode, default to Auto

      • getAztecSymbolMode

        public int getAztecSymbolMode()

        Get a Aztec Symbol mode. Default is Auto mode.

      • getAztecSymbolModeName

        public java.lang.String getAztecSymbolModeName()

        Gets the name of stop symbol (character) of codabar symbology

      • setAztecSymbolMode

        public void setAztecSymbolMode(int value)

        Set a Aztec Symbol mode. Default is Auto mode.


          BarCodeBuilder b = new BarCodeBuilder();
          b.setCodeText("Aztec Full-range text");
          b.setSymbologyType(Symbology.Aztec);
          b.setAztecSymbolMode(AztecSymbolMode.FullRange);
          b.save("test.png");
          

      • getAlwaysShowChecksum

        public boolean getAlwaysShowChecksum()

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

      • setAlwaysShowChecksum

        public void setAlwaysShowChecksum(boolean value)

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

      • dispose

        protected void dispose(boolean disposing)

        Clean up any resources being used.

        Parameters:
        disposing - true to release both managed and unmanaged resources; false to release only unmanaged resources.
      • generateBarCodeImage

        public java.awt.image.BufferedImage generateBarCodeImage()

        Generate the BarCode image under current settings

        Returns:
        BarCode Image See System.Drawing.Bitmap.
      • rotate

        public void rotate()

        Rotate barcode image clockwise for 90 degrees

        Specified by:
        rotate in interface IBarCodeControl
      • rotate

        public void rotate(float angle)

        Rotate barcode image clockwise

        Specified by:
        rotate in interface IBarCodeControl
        Parameters:
        angle - Rotation Angle
      • rotate

        public void rotate(int direction,
                  float angle)

        Rotate the barcode image

        Specified by:
        rotate in interface IBarCodeControl
        Parameters:
        direction - rotation direction
        angle - rotation angle
      • print

        public void print()
                   throws javax.print.PrintException

        Print BarCodeImage See PrinterName}.


         BarCodeBuilder b = new BarCodeBuilder();
         b.setCodeText("123456");
          b.setSymbologyType(Symbology.Pdf417);
         b.print()
         

        Throws:
        javax.print.PrintException
      • getMinimumBarCodeSize

        public java.awt.geom.Dimension2D getMinimumBarCodeSize()
        Returns the minimum width and height, in current GraphicsUnit, of this BarCode.
        Returns:
        A Dimension2D class that represents the minimum width and height, in current GraphicsUnit, of this BarCode.
      • getOnlyBarCodeImage

        public java.awt.image.BufferedImage getOnlyBarCodeImage()

        Gets the only barcode image. Requires license.

        Returns:
        Image's bitmap.
        Throws:
        BarCodeException - Throws exception if no license set.
      • getOnlyBarCodeImage

        public java.awt.image.BufferedImage getOnlyBarCodeImage(int scaleFactor)

        Gets the only barcode image. Requires license.

        Parameters:
        scaleFactor - Minimal value of scale factor is 1. Not limited by the code.
        Returns:
        Image's bitmap.
        Throws:
        BarCodeException - Throws exception if no license set.
      • getCustomSizeBarCodeImage

        public java.awt.image.BufferedImage getCustomSizeBarCodeImage(java.awt.Dimension customBarCodeSize,
                                                             boolean allowSpaceAround)

        Gets the scaled barcode image.

        Parameters:
        customBarCodeSize - BarCode full image size. Default Graphics Unit: Millimeter.
        allowSpaceAround - if set to true} allow space around the barcode.
        Returns:
        Image's bitmap.
      • getCustomSizeBarCodeImage

        public java.awt.image.BufferedImage getCustomSizeBarCodeImage(float customBarCodeWidth,
                                                             float customBarCodeHeight,
                                                             boolean allowSpaceAround)
        Gets the scaled barcode image.
        Parameters:
        customBarCodeWidth - arCode full image width. Default Graphics Unit: Millimeter.
        customBarCodeHeight - BarCode full image height. Default Graphics Unit: Millimeter.
        allowSpaceAround - if set to true allow space around the barcode.
        Returns:
        Image's bitmap.
      • save

        public void save(java.lang.String filename)

        Save BarCodeImage to specific file in specific format

        Specified by:
        save in interface IBarCodeControl
        Parameters:
        filename - save to this file path
      • save

        public void save(java.lang.String filename,
                com.aspose.barcode.ImageFormat format)
                  throws java.io.IOException

        Save BarCodeImage to specific file in specific format

        Specified by:
        save in interface IBarCodeControl
        Parameters:
        filename - save to this file path
        format -
        Throws:
        java.io.IOException
      • save

        public void save(java.io.OutputStream stream,
                com.aspose.barcode.ImageFormat format)
                  throws java.io.IOException

        Save BarCodeImage to specific file in specific format

        Parameters:
        format -
        Throws:
        java.io.IOException
      • save

        public void save(java.io.OutputStream stream,
                int format)
                  throws java.io.IOException

        Save BarCodeImage to stream in specific format

        Specified by:
        save in interface IBarCodeControl
        Parameters:
        stream - java.io.OutputStream
        format - Specifies the file format of the image.
        Throws:
        java.io.IOException
      • save

        public void save(java.lang.String filename,
                int format)
                  throws java.io.IOException

        Save BarCodeImage to specific file in specific format

        Specified by:
        save in interface IBarCodeControl
        Parameters:
        filename - save to this file path
        format - Specifies the file format of the image. Enumerated in BarCodeImageFormat.
        Throws:
        java.io.IOException
      • saveAsEmf

        @Deprecated
        public void saveAsEmf(java.lang.String fileName)
                       throws java.io.IOException
        Deprecated. 

        Save the BarCode as Emf file using given file name.

        Parameters:
        fileName - The file name.
        Throws:
        java.io.IOException
      • saveAsEmf

        @Deprecated
        public void saveAsEmf(java.io.OutputStream stream)
                       throws java.io.IOException
        Deprecated. 

        Save the BarCode as Emf to stream.

        Parameters:
        stream - java.io.OutputStream
        Throws:
        java.io.IOException
      • saveAsTiffInCMYK

        @Deprecated
        public void saveAsTiffInCMYK(java.lang.String filename)
                              throws java.io.IOException
        Deprecated. 

        Save BarCodeImage to specific file as Tiff picture in CMYK color model.

        Parameters:
        filename - save to this file path
        Throws:
        java.io.IOException
      • exportToXml

        public boolean exportToXml(java.lang.String xmlFile)

        Exports BarCode properties to the xml-file specified

        Parameters:
        xmlFile - The name for the file
        Returns:
        Whether or not export completed successfully. Returns true in case of success; false otherwise
      • importFromXml

        public static BarCodeBuilder importFromXml(java.lang.String xmlFile)

        Imports BarCode properties from the xml-file specified and applies them to the current BarCodeBuilder instance.

        Parameters:
        xmlFile - The name for the file
        Returns:
        true in case of success; false otherwise
      • toString

        public java.lang.String toString()

        Overridden method representing BarCodeBuilder as a string.

        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representing BarCodeBuilder instance with the following format: "BarCode: SymbologyType:CodeText"
      • getFilledBars

        public boolean getFilledBars()

        Only for 1D barcodes. Gets or sets a value indicating whether bars filled. Default value is true.

        Value: true if bars filled; otherwise, false.
      • setFilledBars

        public void setFilledBars(boolean value)

        Only for 1D barcodes. Gets or sets a value indicating whether bars filled. Default value is true.

        Value: true if bars filled; otherwise, false.
      • getDatamatrixEcc

        public int getDatamatrixEcc()

        Gets a Datamatri ECC type. Default value is ECC200

      • setDatamatrixEcc

        public void setDatamatrixEcc(int value)

        Sets a Datamatri ECC type. Default value is ECC200

      • getBarWidthReduction

        public float getBarWidthReduction()

        Bar width reduction. Default Graphics Unit: Millimeter (to change see System.Drawing.GraphicsUnitGraphicsUnit).

      • setBarWidthReduction

        public void setBarWidthReduction(float value)

        Bar width reduction. Default Graphics Unit: Millimeter (to change see System.Drawing.GraphicsUnitGraphicsUnit).

      • isOverridedDimensionX

        public boolean isOverridedDimensionX()

        Check if x dimension is specified by the user

        Returns:
        <b>true</b>in case x dimension is specified by the user; <b>false</b> otherwise.