com.aspose.barcode

Class BarCodeBuilder

  • All Implemented Interfaces:
    IBarCodeControl


    public class BarCodeBuilder
    extends 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
      
              com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
              b.setSymbologyType(com.aspose.barcode.Symbology.Codabar);
              b.setCodeText("12345678");
              b.save("test.bmp");
     

    • 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(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(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(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()

        BarCode's encode type (symbology). Use Aspose.BarCode.EncodeTypesEncodeTypes 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
          
                  com.aspose.barcode.BarCodeBuilder barCodeBuilder = new BarCodeBuilder();
            barCodeBuilder.setEncodeType(com.aspose.barcode.EncodeTypes.CODABAR);
            barCodeBuilder.setCodeText("12345678");
            barCodeBuilder.getBarCodeImage().save("test.bmp");
                  

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

        public void setEncodeType(BaseEncodeType value)

        BarCode's encode type (symbology). Use Aspose.BarCode.EncodeTypesEncodeTypes 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
          
                  com.aspose.barcode.BarCodeBuilder barCodeBuilder = new BarCodeBuilder();
            barCodeBuilder.setEncodeType(com.aspose.barcode.EncodeTypes.CODABAR);
            barCodeBuilder.setCodeText("12345678");
            barCodeBuilder.getBarCodeImage().save("test.bmp");
                  

        Specified by:
        setEncodeType in interface IBarCodeControl
      • getSymbologyType

        public long getSymbologyType()

        BarCode's symbology, type: com.aspose.barcode.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
          
                  com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
                  b.setSymbologyType(com.aspose.barcode.Symbology.Codabar);
                  b.setCodeText("12345678");
                  b.save("test.bmp");
                  

        Specified by:
        getSymbologyType in interface IBarCodeControl
      • getSymbologyTypeName

        public String getSymbologyTypeName()

        Gets SymbologyType name

        Returns:

      • setSymbologyType

        public void setSymbologyType(long value)

        BarCode's symbology, type: com.aspose.barcode.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
          
                  com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
                  b.setSymbologyType(com.aspose.barcode.Symbology.Codabar);
                  b.setCodeText("12345678");
                  b.save("test.bmp");
                  

        Specified by:
        setSymbologyType in interface IBarCodeControl
      • getCodeText

        public String getCodeText()

        Data to be encoded, different types of BarCode may have different CodeText length restrictions See EnableEscape. See CodeTextFont. See CodeTextColor. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.


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

        Specified by:
        getCodeText in interface IBarCodeControl
      • setCodeText

        public void setCodeText(String value)

        Data to be encoded, different types of BarCode may have different CodeText length restrictions See EnableEscape. See CodeTextFont. See CodeTextColor. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.


          Create and save a BarCode image
          
                  com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
                  b.setSymbologyType(com.aspose.barcode.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 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(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 Charset getCodeTextEncoding()

        Gets the encoding of codetext.

        Value: The encoding for codetext.
      • setCodeTextEncoding

        public void setCodeTextEncoding(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 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(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 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 String getCodeTextColorName()

        Gets the CodeText's Color name

        Returns:
        CodeText's Color name

      • setCodeTextColor

        public void setCodeTextColor(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 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
      • getCaptionAbove

        public Caption getCaptionAbove()

        Caption Above the BarCode image. See Caption. CaptionAbove contains the following properties: CaptionAbove.Font, CaptionAbove.ForeColor, CaptionAbove.Space, CaptionAbove.Visible, CaptionAbove.Text, CaptionAbove.TextAlign


                 
                 com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
          b.getCaptionAbove().setText("This is a BarCode image");
          b.getCaptionAbove().setVisible(true);
          b.getCaptionAbove().setFont(new java.awt.Font("Arial", 0, 8f));
          //space between the barcode and the caption
          b.getCaptionAbove().setSpace(2f);
                 

        Specified by:
        getCaptionAbove in interface IBarCodeControl
      • setCaptionAbove

        public void setCaptionAbove(Caption value)

        Caption Above the BarCode image. See Caption. CaptionAbove contains the following properties: CaptionAbove.Font, CaptionAbove.ForeColor, CaptionAbove.Space, CaptionAbove.Visible, CaptionAbove.Text, CaptionAbove.TextAlign


                 
                 com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
          b.getCaptionAbove().setText("This is a BarCode image");
          b.getCaptionAbove().setVisible(true);
          b.getCaptionAbove().setFont(new java.awt.Font("Arial", 0, 8f));
          //space between the barcode and the caption
          b.getCaptionAbove().setSpace(2f);
                 

        Specified by:
        setCaptionAbove in interface IBarCodeControl
      • getCaptionBelow

        public Caption getCaptionBelow()

        Caption Below the BarCode image. See Caption. CaptionBelow contains the following properties: CaptionBelow.Font, CaptionBelow.ForeColor, CaptionBelow.Space, CaptionBelow.Visible, CaptionBelow.Text, CaptionBelow.TextAlign


                 
                 com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
          b.getCaptionBelow().setText("This is a BarCode image");
          b.getCaptionBelow().setVisible(true);
          b.getCaptionBelow().setFont(new System.Drawing.Font("Arial", 8f));
          //space between the barcode and the caption
          b.getCaptionBelow().setSpace(2f);
                 

        Specified by:
        getCaptionBelow in interface IBarCodeControl
      • setCaptionBelow

        public void setCaptionBelow(Caption value)

        Caption Below the BarCode image. See Caption. CaptionBelow contains the following properties: CaptionBelow.Font, CaptionBelow.ForeColor, CaptionBelow.Space, CaptionBelow.Visible, CaptionBelow.Text, CaptionBelow.TextAlign


                 
                 com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
          b.getCaptionBelow().setText("This is a BarCode image");
          b.getCaptionBelow().setVisible(true);
          b.getCaptionBelow().setFont(new System.Drawing.Font("Arial", 8f));
          //space between the barcode and the caption
          b.getCaptionBelow().setSpace(2f);
                 

        Specified by:
        setCaptionBelow in interface IBarCodeControl
      • getGraphicsUnit

        public int getGraphicsUnit()

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

        Specified by:
        getGraphicsUnit in interface IBarCodeControl
      • 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 String getPrinterName()

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

      • setPrinterName

        public void setPrinterName(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 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, ImageWidth 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, ImageWidth 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 BufferedImage getBarCodeImage()

        Get the BarCode image under current settings


         
         com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
         b.setCodeText = "12345678";
         b.setSymbologyType(com.aspose.barcode.Symbology.Codabar);
         b.save("test.bmp");
         

        Specified by:
        getBarCodeImage in interface IBarCodeControl
      • getBorderVisible

        public boolean getBorderVisible()

        Gets a value indicating whether [border visible].

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

        public void setBorderVisible(boolean value)

        Sets a value indicating whether [border visible].

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

        public Color getBorderColor()

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

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

        public String getBorderColorName()

        Gets a barcode Image's border's color name

      • setBorderColor

        public void setBorderColor(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 String getCodabarStartSymbolName()

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

      • getCodabarStopSymbolName

        public 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. See CodabarChecksumMode.


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

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


                
                

      • getAustraliaPostFormatControlCode

        public int getAustraliaPostFormatControlCode()

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


                 com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
          b.setSymbologyType(Aspose.BarCode.SymbologyType.AustraliaPost);
          b.setAustraliaPostFormatControlCode(AustraliaPostFormatControlCode.Standard);
          b.setCodeText("12345678");
          

        Specified by:
        getAustraliaPostFormatControlCode in interface IBarCodeControl
      • setAustraliaPostFormatControlCode

        public void setAustraliaPostFormatControlCode(int value)

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


                 com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder();
          b.setSymbologyType(Aspose.BarCode.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"


                 [C#]
                 BarCodeBuilder b = new BarCodeBuilder();
           b.SymbologyType = Symbology.AustraliaPost;
           b.CustomerInformationInterpretingType = CustomerInformationInterpretingType.CTable;
           b.CodeText = "5912345678ABCde";
          [VB.NET]
          Dim b As BarCodeBuilder
          b = new BarCodeBuilder()
          b.SymbologyType = Symbology.AustraliaPost
          b.CustomerInformationInterpretingType = CustomerInformationInterpretingType.CTable
          b.CodeText = "5912345678ABCde"
          

      • setCustomerInformationInterpretingType

        public void setCustomerInformationInterpretingType(int value)

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


                 [C#]
                 BarCodeBuilder b = new BarCodeBuilder();
           b.SymbologyType = Symbology.AustraliaPost;
           b.CustomerInformationInterpretingType = CustomerInformationInterpretingType.CTable;
           b.CodeText = "5912345678ABCde";
          [VB.NET]
          Dim b As BarCodeBuilder
          b = new BarCodeBuilder()
          b.SymbologyType = Symbology.AustraliaPost
          b.CustomerInformationInterpretingType = CustomerInformationInterpretingType.CTable
          b.CodeText = "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 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 String getForeColorName()
        Gets a foreground color name
        Returns:
        foreground color name
      • setForeColor

        public void setForeColor(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
      • getBackColorName

        public String getBackColorName()

        Gets a background color name of the barcode image

      • setBackColor

        public void setBackColor(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 String getSupplementData()

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


         
         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(String value)

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


         
         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()

        Gets or sets a Aztec Symbol mode. Default is Auto mode.


          
          [C#]
          BarCodeBuilder b = new BarCodeBuilder();
          b.CodeText = "Aztec Full-range text";
          b.SymbologyType = Aspose.BarCode.SymbologyType.Aztec;
          b.AztecSymbolMode = Aspose.BarCode.AztecSymbolMode.FullRange;
          b.BarCodeImage.Save("test.png");
          [VB.NET]
          dim b as Aspose.BarCode.BarCodeBuilder
          b = new BarCodeBuilder()
          b.CodeText = "Aztec Full-range text"
          b.SymbologyType = Aspose.BarCode.SymbologyType.Aztec
          b.AztecSymbolMode = Aspose.BarCode.AztecSymbolMode.FullRange
          b.BarCodeImage.Save("test.png")
                

      • setAztecSymbolMode

        public void setAztecSymbolMode(int value)

        Gets or sets a Aztec Symbol mode. Default is Auto mode.


          
          [C#]
          BarCodeBuilder b = new BarCodeBuilder();
          b.CodeText = "Aztec Full-range text";
          b.SymbologyType = Aspose.BarCode.SymbologyType.Aztec;
          b.AztecSymbolMode = Aspose.BarCode.AztecSymbolMode.FullRange;
          b.BarCodeImage.Save("test.png");
          [VB.NET]
          dim b as Aspose.BarCode.BarCodeBuilder
          b = new BarCodeBuilder()
          b.CodeText = "Aztec Full-range text"
          b.SymbologyType = Aspose.BarCode.SymbologyType.Aztec
          b.AztecSymbolMode = Aspose.BarCode.AztecSymbolMode.FullRange
          b.BarCodeImage.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.

      • generateBarCodeImage

        public BufferedImage generateBarCodeImage()

        Generate the BarCode image under current settings

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

        public void saveAsEmf(String fileName)

        Save the BarCode as Emf file using given file name.

        Parameters:
        fileName - The file name.
      • saveAsEmf

        public void saveAsEmf(InputStream stream)

        Save the BarCode as Emf to stream.

        Parameters:
        stream - System.IO.Stream
      • 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 PrintException

        Print BarCodeImage See PrinterName}.


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

        Throws:
        PrintException
      • getOnlyBarCodeImage

        public BufferedImage getOnlyBarCodeImage()

        Gets the only barcode image. Requires license.

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

        public 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 BufferedImage getCustomSizeBarCodeImage(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 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(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(String filename,
                com.aspose.barcode.ImageFormat format)
                  throws IOException

        Save BarCodeImage to specific file in specific format

        Specified by:
        save in interface IBarCodeControl
        Parameters:
        filename - save to this file path
        format - System.Drawing.Imaging.ImageFormat
        Throws:
        IOException
      • save

        public void save(OutputStream stream,
                int format)
                  throws 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:
        IOException
      • save

        public void save(String filename,
                int format)
                  throws 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:
        IOException
      • save

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

        Save BarCodeImage to specific file in specific format

        Parameters:
        stream - System.IO.Stream
        format - System.Drawing.Imaging.ImageFormat
        Throws:
        IOException
      • saveAsTiffInCMYK

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

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

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

        public boolean exportToXml(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(String xmlFile)

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

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

        public String toString()

        Overridden method representing BarCodeBuilder as a string.

        Overrides:
        toString in class 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.