com.aspose.barcode
Class BarCodeBuilder

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

public class BarCodeBuilder
extends java.lang.Object
implements IBarCodeControl

BarCodeBuilder for backend com.aspose.barcode images generation. See Aspose.BarCode.Windows.Forms.BarCodeControl. See Aspose.BarCode.Web.UI.BarCodeWebControl.

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


         Create and save a BarCode image


Field Summary
static char EAN_128_FNC_1
           
 
Constructor Summary
BarCodeBuilder()
           BarCodeBuilder's constructer, default SymbologyType is Code128, default CodeText is 12345678
BarCodeBuilder(java.lang.String CodeText)
           BarCodeBuilder's constructer, default SymbologyType is Code128
BarCodeBuilder(java.lang.String CodeText, long type)
           BarCodeBuilder's constructer
 
Method Summary
 void dispose()
           Clean up any resources being used.
 Bitmap generateBarCodeImage()
           Generate the BarCode image under current settings
 boolean getAlwaysShowChecksum()
           Always display checksum digit in the humanreadable text for Code128 and EAN128 barcodes.
 float getAspectRatio()
           2D BarCode's module's height/width ratio (yDimension/xDimension).
 int getAustralianPosteParcelCodeSet()
           Australian Post Domestic eParcel com.aspose.barcode symbology type of com.aspose.barcode's code set, default to AustralianPosteParcelCodeSet.Auto" See Aspose.BarCode.Code128CodeSet.
 int getAustraliaPostFormatControlCode()
           Australia Post symbology type of com.aspose.barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard" See Aspose.BarCode.AustraliaPostFormatControlCode.
 boolean getAutoSize()
           
 int getAztectErrorLevel()
           Level of error corection of Aztect types of com.aspose.barcode.
 java.awt.Color getBackColor()
           Background color of the com.aspose.barcode image
 java.awt.image.BufferedImage getBarCodeImage()
          Get the BarCode image under current settings
 float getBarHeight()
           height of 1D barcodes' bars.
 java.awt.Color getBorderColor()
           
 int getBorderDashStyle()
           
 boolean getBorderVisible()
           
 float getBorderWidth()
           BarCode Image's border's width Default Graphics Unit: Millimeter See BorderVisible.
 Caption getCaptionAbove()
           Caption Above the BarCode image.
 Caption getCaptionBelow()
           Caption Below the BarCode image.
 short getCodabarStartSymbol()
           
 short getCodabarStopSymbol()
           
 int getCode128CodeSet()
           Code128 symbology type of com.aspose.barcode's code set, default to Code128CodeSet.Auto" See Aspose.BarCode.Code128CodeSet.
 int getCodeLocation()
           
 java.lang.String getCodeText()
           
 int getCodeTextAlignment()
          Getsthe alignment of the code text.
 java.awt.Color getCodeTextColor()
           
 java.awt.Font getCodeTextFont()
           
 Font getCodeTextMsFont()
           
 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
 java.awt.image.BufferedImage getCustomSizeBarCodeImage(java.awt.Dimension customBarCodeSize)
           
 int getDataMatrixEncodeMode()
           Encode mode of Datamatrix com.aspose.barcode, default to Auto
 java.lang.String getDisplay2DText()
           Gets the text will displayed on the com.aspose.barcode's image.
 int getEAN128EncodeMode()
           EAN128 symbology type of com.aspose.barcode's EncodeMode, default to EAN128EncodeMode.AI See Aspose.BarCode.EAN128EncodeMode.
 int getEnableChecksum()
          
 boolean getEnableEscape()
           
 java.awt.Color getForeColor()
           Foreground color of the com.aspose.barcode image, that is, Bar's color of 1D com.aspose.barcode, Module's color of 2D com.aspose.barcode
 int getGraphicsUnit()
           Measurement of various properties such as Width, Height etc.
 float getImageHeight()
           
 int getImageQuality()
           Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias.
 int getImageUnit()
          Deprecated. 
 float getImageWidth()
           
 int getITF14BorderType()
           Border type of ITF14 com.aspose.barcode, quiet zone will be determined by margin settings.
 int getMacroPdf417FileID()
           Gets macro pdf417 com.aspose.barcode's file ID.
 boolean getMacroPdf417LastSegment()
           Gets whether this macro pdf417 com.aspose.barcode is the last segment.
 int getMacroPdf417SegmentID()
           Gets macro pdf417 com.aspose.barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
 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
 java.awt.image.BufferedImage getOnlyBarCodeImage()
           Gets the only com.aspose.barcode image.
 java.awt.image.BufferedImage getOnlyBarCodeImage(int scaleFactor)
           Gets the only com.aspose.barcode image.
 int getPdf417CompactionMode()
           Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>
 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 com.aspose.barcode, it has to be between 1 millimeter and 1.5 milimeters.
 float getPostnetShortBarHeight()
           Short bar's height of Postnet com.aspose.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 <bode>Auto</bode> See Aspose.BarCode.QREncodeMode.
 int getQRErrorLevel()
           Level of Reed-Solomon error correction for QR com.aspose.barcode.
 Resolution getResolution()
           Gets the resolution of the BarCode image See Resolution.
 int getRotationAngle()
          Deprecated. 
 float getRotationAngleF()
           BarCode image's rotation angle, measured in degree, e.g.
 int getRows()
           2D 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, BooklandEAN, Interleaved2of5 or Standard2of5.
 float getSupplementSpace()
           Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter See System.Drawing.GraphicsUnit.
 long getSymbologyType()
           
 int getTextRenderingHint()
           Specifies the quality of text rendering.
 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 boolean isLicensed()
           Gets a value indicating whether generation module is licensed.
 void rotate()
           Rotate com.aspose.barcode image clockwise for 90 degrees
 void rotate(float angle)
           Rotate com.aspose.barcode image clockwise
 void rotate(int angle)
           Rotate the com.aspose.barcode image
 void rotate(int direction, float angle)
           Rotate the com.aspose.barcode image
 void rotate(int direction, int angle)
           Rotate the com.aspose.barcode image
 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 saveImageAs(java.lang.String filename)
           Save the com.aspose.barcode image
 void setAlwaysShowChecksum(boolean value)
           Always display checksum digit in the humanreadable text for Code128 and EAN128 barcodes.
 void setAspectRatio(float value)
           
 void setAustralianPosteParcelCodeSet(int value)
           
 void setAustraliaPostFormatControlCode(int value)
           
 void setAutoSize(boolean value)
           
 void setAztectErrorLevel(int value)
           Level of error corection of Aztect types of com.aspose.barcode.
 void setBackColor(java.awt.Color value)
           Background color of the com.aspose.barcode image
 void setBarHeight(float value)
           
 void setBorderColor(java.awt.Color value)
           
 void setBorderDashStyle(int value)
           
 void setBorderVisible(boolean value)
           
 void setBorderWidth(float value)
           
 void setCaptionAbove(Caption value)
           
 void setCaptionBelow(Caption value)
           
 void setCodabarStartSymbol(short value)
           
 void setCodabarStopSymbol(short value)
           
 void setCode128CodeSet(int value)
           
 void setCodeLocation(int value)
           
 void setCodeText(byte[] codeText)
           Set the data to be encoded.
 void setCodeText(java.lang.String value)
           
 void setCodeTextAlignment(int value)
          Sets the alignment of the code text.
 void setCodeTextColor(java.awt.Color value)
           
 void setCodeTextFont(java.awt.Font value)
           
 void setCodeTextMsFont(Font value)
           
 void setCodeTextSpace(float value)
           
 void setColumns(int value)
           2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417
 void setDataMatrixEncodeMode(int value)
           Encode mode of Datamatrix com.aspose.barcode, default to Auto
 void setDisplay2DText(java.lang.String value)
           Sets the text will displayed on the com.aspose.barcode's image.
 void setEAN128EncodeMode(int value)
           
 void setEnableChecksum(int value)
           
 void setEnableEscape(boolean value)
           
 void setForeColor(java.awt.Color value)
           Foreground color of the com.aspose.barcode image, that is, Bar's color of 1D com.aspose.barcode, Module's color of 2D com.aspose.barcode
 void setGraphicsUnit(int value)
           
 void setImageHeight(float value)
           
 void setImageQuality(int value)
           
 void setImageUnit(int value)
          Deprecated. 
 void setImageWidth(float value)
           
 void setITF14BorderType(int value)
           
 void setMacroPdf417FileID(int value)
           Sets macro pdf417 com.aspose.barcode's file ID.
 void setMacroPdf417LastSegment(boolean value)
           Sets whether this macro pdf417 com.aspose.barcode is the last segment.
 void setMacroPdf417SegmentID(int value)
           Sets macro pdf417 com.aspose.barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
 void setPdf417CompactionMode(int value)
           Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>
 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)
           
 void setPostnetShortBarHeight(float value)
           
 void setPrinterName(java.lang.String value)
           
 void setQREncodeMode(int value)
           QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode> See Aspose.BarCode.QREncodeMode.
 void setQRErrorLevel(int value)
           Level of Reed-Solomon error correction for QR com.aspose.barcode.
 void setResolution(Resolution value)
           Sets the resolution of the BarCode image See Resolution.
 void setRotationAngle(int value)
          Deprecated. 
 void setRotationAngleF(float value)
           
 void setRows(int value)
           2D 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, BooklandEAN, Interleaved2of5 or Standard2of5.
 void setSupplementSpace(float value)
           
 void setSymbologyType(long value)
           
 void setTextRenderingHint(int value)
           
 void setWideNarrowRatio(float value)
           Wide bars to Narrow bars ratio for some 1D BarCode.
 void setxDimension(float value)
           
 void setyDimension(float value)
           
 java.lang.String toString()
           overried to string method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.aspose.barcode.IBarCodeControl
save
 

Field Detail

EAN_128_FNC_1

public static final char EAN_128_FNC_1
See Also:
Constant Field Values
Constructor Detail

BarCodeBuilder

public BarCodeBuilder()

BarCodeBuilder's constructer, default SymbologyType is Code128, default CodeText is 12345678


BarCodeBuilder

public BarCodeBuilder(java.lang.String CodeText)

BarCodeBuilder's constructer, default SymbologyType is Code128

Parameters:
CodeText - string text data to be encoded

BarCodeBuilder

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

BarCodeBuilder's constructer

Parameters:
CodeText - string text data to be encoded
type - BarCode's type: Aspose.BarCode.SymbologyType
Method Detail

dispose

public void dispose()

Clean up any resources being used.


generateBarCodeImage

public Bitmap generateBarCodeImage()

Generate the BarCode image under current settings

Returns:
BarCode Image See System.Drawing.Bitmap.

getAlwaysShowChecksum

public boolean getAlwaysShowChecksum()

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


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

getAustralianPosteParcelCodeSet

public int getAustralianPosteParcelCodeSet()

Australian Post Domestic eParcel com.aspose.barcode symbology type of com.aspose.barcode's code set, default to AustralianPosteParcelCodeSet.Auto" See Aspose.BarCode.Code128CodeSet.


         [C#]
   Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder();
   b.SymbologyType = Aspose.BarCode.Symbology.AustralianPosteParcel;
   b.AustralianPosteParcelCodeSet = AustralianPosteParcelCodeSet.Auto;
   b.CodeText = "99700160DJS123456701021502000";
 

[VB.NET] dim b as Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder() b.SymbologyType = Aspose.BarCode.Symbology.AustralianPosteParcel b.AustralianPosteParcelCodeSet = AustralianPosteParcelCodeSet.Auto; b.CodeText = "99700160DJS123456701021502000"


getAustraliaPostFormatControlCode

public int getAustraliaPostFormatControlCode()

Australia Post symbology type of com.aspose.barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard" See Aspose.BarCode.AustraliaPostFormatControlCode.


         [C#]
         Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder();
  b.SymbologyType = Aspose.BarCode.SymbologyType.AustraliaPost;
  b.AustraliaPostFormatControlCode = AustraliaPostFormatControlCode.Standard;
  b.CodeText = "12345678";
 

[VB.NET] dim b as Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder() b.SymbologyType = Aspose.BarCode.SymbologyType.AustraliaPost b.AustraliaPostFormatControlCode = AustraliaPostFormatControlCode.Standard b.CodeText = "12345678"

Specified by:
getAustraliaPostFormatControlCode in interface IBarCodeControl

getAutoSize

public boolean getAutoSize()
Specified by:
getAutoSize in interface IBarCodeControl

getAztectErrorLevel

public int getAztectErrorLevel()

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


getBackColor

public java.awt.Color getBackColor()

Background color of the com.aspose.barcode image

Specified by:
getBackColor in interface IBarCodeControl

getBarCodeImage

public java.awt.image.BufferedImage getBarCodeImage()
Get the BarCode image under current settings

Specified by:
getBarCodeImage in interface IBarCodeControl
Returns:

getBarHeight

public float getBarHeight()

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

Specified by:
getBarHeight in interface IBarCodeControl

getBorderColor

public java.awt.Color getBorderColor()
Specified by:
getBorderColor in interface IBarCodeControl

getBorderDashStyle

public int getBorderDashStyle()
Specified by:
getBorderDashStyle in interface IBarCodeControl

getBorderVisible

public boolean getBorderVisible()
Specified by:
getBorderVisible 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

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


         
         [C#]
         Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder();
  b.CaptionAbove.Text = "This is a BarCode image";
  b.CaptionAbove.Visible = true;
  b.CaptionAbove.Font = new System.Drawing.Font("Arial", 8f);
  //space between the com.aspose.barcode and the caption
  b.CaptionAbove.Space = 2f;
 

[VB.NET] Dim b As Aspose.BarCode.BarCodeBuilder b = New Aspose.BarCode.BarCodeBuilder b.CaptionAbove.Text = "This is a BarCode image" b.CaptionAbove.Visible = True b.CaptionAbove.Font = New System.Drawing.Font("Arial", 8.0F) 'Space between the com.aspose.barcode and the caption b.CaptionAbove.Space = 2.0F

Specified by:
getCaptionAbove 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


         
         [C#]
         Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder();
  b.CaptionAbove.Text = "This is a BarCode image";
  b.CaptionAbove.Visible = true;
  b.CaptionAbove.Font = new System.Drawing.Font("Arial", 8f);
  //space between the com.aspose.barcode and the caption
  b.CaptionAbove.Space = 2f;
 

[VB.NET] Dim b As Aspose.BarCode.BarCodeBuilder b = New Aspose.BarCode.BarCodeBuilder b.CaptionAbove.Text = "This is a BarCode image" b.CaptionAbove.Visible = True b.CaptionAbove.Font = New System.Drawing.Font("Arial", 8.0F) 'Space between the com.aspose.barcode and the caption b.CaptionAbove.Space = 2.0F

Specified by:
getCaptionBelow in interface IBarCodeControl

getCodabarStartSymbol

public short getCodabarStartSymbol()
Specified by:
getCodabarStartSymbol in interface IBarCodeControl

getCodabarStopSymbol

public short getCodabarStopSymbol()
Specified by:
getCodabarStopSymbol in interface IBarCodeControl

getCode128CodeSet

public int getCode128CodeSet()

Code128 symbology type of com.aspose.barcode's code set, default to Code128CodeSet.Auto" See Aspose.BarCode.Code128CodeSet.


         [C#]
         Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder();
  b.SymbologyType = Aspose.BarCode.SymbologyType.Code128;
  b.Code128CodeSet = Code128CodeSet.Auto;
  b.CodeText = "123456";
 

[VB.NET] dim b as Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder() b.SymbologyType = Aspose.BarCode.SymbologyType.Code128 b.Code128CodeSet = Code128CodeSet.Auto; b.CodeText = "123456"

Specified by:
getCode128CodeSet in interface IBarCodeControl

getCodeLocation

public int getCodeLocation()
Specified by:
getCodeLocation in interface IBarCodeControl

getCodeText

public java.lang.String getCodeText()
Specified by:
getCodeText in interface IBarCodeControl

getCodeTextAlignment

public int getCodeTextAlignment()
Getsthe alignment of the code text.

Specified by:
getCodeTextAlignment in interface IBarCodeControl

getCodeTextColor

public java.awt.Color getCodeTextColor()
Specified by:
getCodeTextColor in interface IBarCodeControl

getCodeTextFont

public java.awt.Font getCodeTextFont()
Specified by:
getCodeTextFont in interface IBarCodeControl

getCodeTextMsFont

public Font getCodeTextMsFont()

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

getColumns

public int getColumns()

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

Specified by:
getColumns in interface IBarCodeControl

getCustomSizeBarCodeImage

public java.awt.image.BufferedImage getCustomSizeBarCodeImage(java.awt.Dimension customBarCodeSize)

getDataMatrixEncodeMode

public int getDataMatrixEncodeMode()

Encode mode of Datamatrix com.aspose.barcode, default to Auto


getDisplay2DText

public java.lang.String getDisplay2DText()

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

Value: The text to display.

Specified by:
getDisplay2DText in interface IBarCodeControl

getEAN128EncodeMode

public int getEAN128EncodeMode()

EAN128 symbology type of com.aspose.barcode's EncodeMode, default to EAN128EncodeMode.AI See Aspose.BarCode.EAN128EncodeMode.


         [C#]
         Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder();
  b.SymbologyType = Aspose.BarCode.SymbologyType.EAN128;
  b.EAN128EncodeMode = Code128CodeSet.AutoAI;
  b.CodeText = "(30)23(17)20101207";
 

[VB.NET] dim b as Aspose.BarCode.BarCodeBuilder b = new BarCodeBuilder() b.SymbologyType = Aspose.BarCode.SymbologyType.EAN128 b.EAN128EncodeMode = Code128CodeSet.AutoAI b.CodeText = "(30)23(17)20101207"


getEnableChecksum

public int getEnableChecksum()

Enable checksum during generation for 1D barcodes.

Default is treated as Yes for symbologies which must contain checksum, as No where checksum only possible.

Checksum never used: Codabar

Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN

Checksum always used: Rest symbologies

Specified by:
getEnableChecksum in interface IBarCodeControl

getEnableEscape

public boolean getEnableEscape()
Specified by:
getEnableEscape in interface IBarCodeControl

getForeColor

public java.awt.Color getForeColor()

Foreground color of the com.aspose.barcode image, that is, Bar's color of 1D com.aspose.barcode, Module's color of 2D com.aspose.barcode

Specified by:
getForeColor 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

getImageHeight

public float getImageHeight()
Specified by:
getImageHeight in interface IBarCodeControl

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

getImageUnit

@Deprecated
public int getImageUnit()
Deprecated. 

Obsoleted, Use GraphicsUnit instead


getImageWidth

public float getImageWidth()
Specified by:
getImageWidth in interface IBarCodeControl

getITF14BorderType

public int getITF14BorderType()

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


getMacroPdf417FileID

public int getMacroPdf417FileID()

Gets macro pdf417 com.aspose.barcode's file ID.


getMacroPdf417LastSegment

public boolean getMacroPdf417LastSegment()

Gets whether this macro pdf417 com.aspose.barcode is the last segment.


getMacroPdf417SegmentID

public int getMacroPdf417SegmentID()

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


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

getOnlyBarCodeImage

public java.awt.image.BufferedImage getOnlyBarCodeImage()

Gets the only com.aspose.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 com.aspose.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.

getPdf417CompactionMode

public int getPdf417CompactionMode()

Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>

Specified by:
getPdf417CompactionMode 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

getPdf417Truncate

public boolean getPdf417Truncate()

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

Specified by:
getPdf417Truncate in interface IBarCodeControl

getPlanetShortBarHeight

public float getPlanetShortBarHeight()

Short bar's height of Planet com.aspose.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

getPostnetShortBarHeight

public float getPostnetShortBarHeight()

Short bar's height of Postnet com.aspose.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

getPrinterName

public java.lang.String getPrinterName()

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


getQREncodeMode

public int getQREncodeMode()

QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode> See Aspose.BarCode.QREncodeMode.


getQRErrorLevel

public int getQRErrorLevel()

Level of Reed-Solomon error correction for QR com.aspose.barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see Aspose.BarCode.QRErrorLevelQRErrorLevel.


getResolution

public Resolution getResolution()

Gets the resolution of the BarCode image See Resolution.

Specified by:
getResolution in interface IBarCodeControl

getRotationAngle

@Deprecated
public int getRotationAngle()
Deprecated. 

Obsoleted, Use RotationAngleF instead


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

getRows

public int getRows()

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


getSupplementData

public java.lang.String getSupplementData()

Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, BooklandEAN, Interleaved2of5 or Standard2of5. See Aspose.BarCode.Symbology. See SupplementSpace.


 

Specified by:
getSupplementData in interface IBarCodeControl

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

getSymbologyType

public long getSymbologyType()
Specified by:
getSymbologyType in interface IBarCodeControl

getTextRenderingHint

public int getTextRenderingHint()

Specifies the quality of text rendering.

Specified by:
getTextRenderingHint in interface IBarCodeControl

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 See Aspose.BarCode.Symbology.

Specified by:
getWideNarrowRatio in interface IBarCodeControl

getxDimension

public float getxDimension()

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

Specified by:
getxDimension 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 com.aspose.barcode, y-dimension * rows determines BarCode's height In 1D com.aspose.barcode, BarHeight determines BarCode's height. Default Graphics Unit: Millimeter See xDimension. See BarHeight.

Specified by:
getyDimension in interface IBarCodeControl

isLicensed

public static boolean isLicensed()

Gets a value indicating whether generation module is licensed.

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


rotate

public void rotate()

Rotate com.aspose.barcode image clockwise for 90 degrees

Specified by:
rotate in interface IBarCodeControl

rotate

public void rotate(float angle)

Rotate com.aspose.barcode image clockwise

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

rotate

public void rotate(int angle)

Rotate the com.aspose.barcode image

Specified by:
rotate in interface IBarCodeControl
Parameters:
angle - either 0, 90, 180 or 270 degree

rotate

public void rotate(int direction,
                   float angle)

Rotate the com.aspose.barcode image

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

rotate

public void rotate(int direction,
                   int angle)

Rotate the com.aspose.barcode image

Specified by:
rotate in interface IBarCodeControl
Parameters:
direction - specify clockwise or anti-clockwise
angle - either 0, 90, 180 or 270 degree

save

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

Save BarCodeImage to stream in specific format

Throws:
java.io.IOException

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

saveImageAs

public void saveImageAs(java.lang.String filename)

Save the com.aspose.barcode image

Parameters:
filename - Full path of the target image file

setAlwaysShowChecksum

public void setAlwaysShowChecksum(boolean value)

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


setAspectRatio

public void setAspectRatio(float value)
Specified by:
setAspectRatio in interface IBarCodeControl

setAustralianPosteParcelCodeSet

public void setAustralianPosteParcelCodeSet(int value)

setAustraliaPostFormatControlCode

public void setAustraliaPostFormatControlCode(int value)
Specified by:
setAustraliaPostFormatControlCode in interface IBarCodeControl

setAutoSize

public void setAutoSize(boolean value)
Specified by:
setAutoSize in interface IBarCodeControl

setAztectErrorLevel

public void setAztectErrorLevel(int value)

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


setBackColor

public void setBackColor(java.awt.Color value)

Background color of the com.aspose.barcode image

Specified by:
setBackColor in interface IBarCodeControl

setBarHeight

public void setBarHeight(float value)
Specified by:
setBarHeight in interface IBarCodeControl

setBorderColor

public void setBorderColor(java.awt.Color value)
Specified by:
setBorderColor in interface IBarCodeControl

setBorderDashStyle

public void setBorderDashStyle(int value)
Specified by:
setBorderDashStyle in interface IBarCodeControl

setBorderVisible

public void setBorderVisible(boolean value)
Specified by:
setBorderVisible in interface IBarCodeControl

setBorderWidth

public void setBorderWidth(float value)
Specified by:
setBorderWidth in interface IBarCodeControl

setCaptionAbove

public void setCaptionAbove(Caption value)
Specified by:
setCaptionAbove in interface IBarCodeControl

setCaptionBelow

public void setCaptionBelow(Caption value)
Specified by:
setCaptionBelow in interface IBarCodeControl

setCodabarStartSymbol

public void setCodabarStartSymbol(short value)
Specified by:
setCodabarStartSymbol in interface IBarCodeControl

setCodabarStopSymbol

public void setCodabarStopSymbol(short value)
Specified by:
setCodabarStopSymbol in interface IBarCodeControl

setCode128CodeSet

public void setCode128CodeSet(int value)
Specified by:
setCode128CodeSet in interface IBarCodeControl

setCodeLocation

public void setCodeLocation(int value)
Specified by:
setCodeLocation in interface IBarCodeControl

setCodeText

public void setCodeText(byte[] codeText)

Set the data to be encoded.

Parameters:
codeText - The data to be encoded.

setCodeText

public void setCodeText(java.lang.String value)
Specified by:
setCodeText in interface IBarCodeControl

setCodeTextAlignment

public void setCodeTextAlignment(int value)
Sets the alignment of the code text.

Specified by:
setCodeTextAlignment in interface IBarCodeControl

setCodeTextColor

public void setCodeTextColor(java.awt.Color value)
Specified by:
setCodeTextColor in interface IBarCodeControl

setCodeTextFont

public void setCodeTextFont(java.awt.Font value)
Specified by:
setCodeTextFont in interface IBarCodeControl

setCodeTextMsFont

public void setCodeTextMsFont(Font value)

setCodeTextSpace

public void setCodeTextSpace(float value)
Specified by:
setCodeTextSpace 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

setDataMatrixEncodeMode

public void setDataMatrixEncodeMode(int value)

Encode mode of Datamatrix com.aspose.barcode, default to Auto


setDisplay2DText

public void setDisplay2DText(java.lang.String value)

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

Value: The text to display.

Specified by:
setDisplay2DText in interface IBarCodeControl

setEAN128EncodeMode

public void setEAN128EncodeMode(int value)

setEnableChecksum

public void setEnableChecksum(int value)
Specified by:
setEnableChecksum in interface IBarCodeControl

setEnableEscape

public void setEnableEscape(boolean value)
Specified by:
setEnableEscape in interface IBarCodeControl

setForeColor

public void setForeColor(java.awt.Color value)

Foreground color of the com.aspose.barcode image, that is, Bar's color of 1D com.aspose.barcode, Module's color of 2D com.aspose.barcode

Specified by:
setForeColor in interface IBarCodeControl

setGraphicsUnit

public void setGraphicsUnit(int value)
Specified by:
setGraphicsUnit in interface IBarCodeControl

setImageHeight

public void setImageHeight(float value)
Specified by:
setImageHeight in interface IBarCodeControl

setImageQuality

public void setImageQuality(int value)
Specified by:
setImageQuality in interface IBarCodeControl

setImageUnit

@Deprecated
public void setImageUnit(int value)
Deprecated. 


setImageWidth

public void setImageWidth(float value)
Specified by:
setImageWidth in interface IBarCodeControl

setITF14BorderType

public void setITF14BorderType(int value)

setMacroPdf417FileID

public void setMacroPdf417FileID(int value)

Sets macro pdf417 com.aspose.barcode's file ID.


setMacroPdf417LastSegment

public void setMacroPdf417LastSegment(boolean value)

Sets whether this macro pdf417 com.aspose.barcode is the last segment.


setMacroPdf417SegmentID

public void setMacroPdf417SegmentID(int value)

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


setPdf417CompactionMode

public void setPdf417CompactionMode(int value)

Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>

Specified by:
setPdf417CompactionMode 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

setPdf417Truncate

public void setPdf417Truncate(boolean value)

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

Specified by:
setPdf417Truncate in interface IBarCodeControl

setPlanetShortBarHeight

public void setPlanetShortBarHeight(float value)
Specified by:
setPlanetShortBarHeight in interface IBarCodeControl

setPostnetShortBarHeight

public void setPostnetShortBarHeight(float value)
Specified by:
setPostnetShortBarHeight in interface IBarCodeControl

setPrinterName

public void setPrinterName(java.lang.String value)

setQREncodeMode

public void setQREncodeMode(int value)

QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode> See Aspose.BarCode.QREncodeMode.


setQRErrorLevel

public void setQRErrorLevel(int value)

Level of Reed-Solomon error correction for QR com.aspose.barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see Aspose.BarCode.QRErrorLevelQRErrorLevel.


setResolution

public void setResolution(Resolution value)

Sets the resolution of the BarCode image See Resolution.

Specified by:
setResolution in interface IBarCodeControl

setRotationAngle

@Deprecated
public void setRotationAngle(int value)
Deprecated. 


setRotationAngleF

public void setRotationAngleF(float value)
Specified by:
setRotationAngleF in interface IBarCodeControl

setRows

public void setRows(int value)

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


setSupplementData

public void setSupplementData(java.lang.String value)

Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, BooklandEAN, Interleaved2of5 or Standard2of5. See Aspose.BarCode.Symbology. See SupplementSpace.


 

Specified by:
setSupplementData in interface IBarCodeControl

setSupplementSpace

public void setSupplementSpace(float value)
Specified by:
setSupplementSpace in interface IBarCodeControl

setSymbologyType

public void setSymbologyType(long value)
Specified by:
setSymbologyType in interface IBarCodeControl

setTextRenderingHint

public void setTextRenderingHint(int value)
Specified by:
setTextRenderingHint 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 See Aspose.BarCode.Symbology.

Specified by:
setWideNarrowRatio in interface IBarCodeControl

setxDimension

public void setxDimension(float value)
Specified by:
setxDimension in interface IBarCodeControl

setyDimension

public void setyDimension(float value)
Specified by:
setyDimension in interface IBarCodeControl

toString

public java.lang.String toString()

overried to string method

Overrides:
toString in class java.lang.Object
Returns:
BarCode: SymbologyType: CodeText