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
.
Create and save a BarCode image
Modifier and Type | Field and Description |
---|---|
static char |
EAN_128_FNC_1 |
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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. value should between 10 to 95
|
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()
Enable checksum during generation for 1D barcodes.
|
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. value should between 10 to 95
|
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
save
public static final char EAN_128_FNC_1
public BarCodeBuilder()
BarCodeBuilder's constructer, default SymbologyType is Code128, default CodeText is 12345678
public BarCodeBuilder(java.lang.String CodeText)
BarCodeBuilder's constructer, default SymbologyType is Code128
CodeText
- string text data to be encodedpublic BarCodeBuilder(java.lang.String CodeText, long type)
BarCodeBuilder's constructer
CodeText
- string text data to be encodedtype
- BarCode's type: Aspose.BarCode.SymbologyTypepublic void dispose()
Clean up any resources being used.
public Bitmap generateBarCodeImage()
Generate the BarCode image under current settings
System.Drawing.Bitmap
.public boolean getAlwaysShowChecksum()
Always display checksum digit in the humanreadable text for Code128 and EAN128 barcodes.
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
.
getAspectRatio
in interface IBarCodeControl
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"
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"
getAustraliaPostFormatControlCode
in interface IBarCodeControl
public boolean getAutoSize()
getAutoSize
in interface IBarCodeControl
public int getAztectErrorLevel()
Level of error corection of Aztect types of com.aspose.barcode. value should between 10 to 95
public java.awt.Color getBackColor()
Background color of the com.aspose.barcode image
getBackColor
in interface IBarCodeControl
public java.awt.image.BufferedImage getBarCodeImage()
getBarCodeImage
in interface IBarCodeControl
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
.
getBarHeight
in interface IBarCodeControl
public java.awt.Color getBorderColor()
getBorderColor
in interface IBarCodeControl
public int getBorderDashStyle()
getBorderDashStyle
in interface IBarCodeControl
public boolean getBorderVisible()
getBorderVisible
in interface IBarCodeControl
public float getBorderWidth()
BarCode Image's border's width
Default Graphics Unit: Millimeter
See BorderVisible
.
See BorderDashStyle
.
See BorderColor
.
getBorderWidth
in interface IBarCodeControl
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
getCaptionAbove
in interface IBarCodeControl
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
getCaptionBelow
in interface IBarCodeControl
public short getCodabarStartSymbol()
getCodabarStartSymbol
in interface IBarCodeControl
public short getCodabarStopSymbol()
getCodabarStopSymbol
in interface IBarCodeControl
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"
getCode128CodeSet
in interface IBarCodeControl
public int getCodeLocation()
getCodeLocation
in interface IBarCodeControl
public java.lang.String getCodeText()
getCodeText
in interface IBarCodeControl
public int getCodeTextAlignment()
getCodeTextAlignment
in interface IBarCodeControl
public java.awt.Color getCodeTextColor()
getCodeTextColor
in interface IBarCodeControl
public java.awt.Font getCodeTextFont()
getCodeTextFont
in interface IBarCodeControl
public Font getCodeTextMsFont()
public float getCodeTextSpace()
Space between the CodeText and the BarCode.
Default Graphics Unit: Millimeter
See CodeText
.
See CodeLocation
.
See CodeTextFont
.
See CodeTextColor
.
See CodeTextAlignment
.
getCodeTextSpace
in interface IBarCodeControl
public int getColumns()
2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417
getColumns
in interface IBarCodeControl
public java.awt.image.BufferedImage getCustomSizeBarCodeImage(java.awt.Dimension customBarCodeSize)
public int getDataMatrixEncodeMode()
Encode mode of Datamatrix com.aspose.barcode, default to Auto
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.getDisplay2DText
in interface IBarCodeControl
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"
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
getEnableChecksum
in interface IBarCodeControl
public boolean getEnableEscape()
getEnableEscape
in interface IBarCodeControl
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
getForeColor
in interface IBarCodeControl
public int getGraphicsUnit()
Measurement of various properties such as Width, Height etc.
Default GraphicsUnit: Millimeter
See System.Drawing.GraphicsUnit
.
getGraphicsUnit
in interface IBarCodeControl
public float getImageHeight()
getImageHeight
in interface IBarCodeControl
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
.
getImageQuality
in interface IBarCodeControl
@Deprecated public int getImageUnit()
Obsoleted, Use GraphicsUnit instead
public float getImageWidth()
getImageWidth
in interface IBarCodeControl
public int getITF14BorderType()
Border type of ITF14 com.aspose.barcode, quiet zone will be determined by margin settings.
public int getMacroPdf417FileID()
Gets macro pdf417 com.aspose.barcode's file ID.
public boolean getMacroPdf417LastSegment()
Gets whether this macro pdf417 com.aspose.barcode is the last segment.
public int getMacroPdf417SegmentID()
Gets macro pdf417 com.aspose.barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
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
getMargins
in interface IBarCodeControl
public java.awt.image.BufferedImage getOnlyBarCodeImage()
Gets the only com.aspose.barcode image. Requires license.
BarCodeException
- Throws exception if no license set.public java.awt.image.BufferedImage getOnlyBarCodeImage(int scaleFactor)
Gets the only com.aspose.barcode image. Requires license.
scaleFactor
- Minimal value of scale factor is 1. Not limited by the code.BarCodeException
- Throws exception if no license set.public int getPdf417CompactionMode()
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>
getPdf417CompactionMode
in interface IBarCodeControl
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
getPdf417ErrorLevel
in interface IBarCodeControl
public boolean getPdf417Truncate()
whether pdf417 symbology type of BarCode is truncated (to reduce space)
getPdf417Truncate
in interface IBarCodeControl
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
.
getPlanetShortBarHeight
in interface IBarCodeControl
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
.
getPostnetShortBarHeight
in interface IBarCodeControl
public java.lang.String getPrinterName()
Choose printer, if not specified, Print() method will choose the first available printer
public int getQREncodeMode()
QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode>
See Aspose.BarCode.QREncodeMode
.
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
.
public Resolution getResolution()
Gets the resolution of the BarCode image
See Resolution
.
getResolution
in interface IBarCodeControl
@Deprecated public int getRotationAngle()
Obsoleted, Use RotationAngleF instead
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
getRotationAngleF
in interface IBarCodeControl
public int getRows()
2D BarCode's rows, if setting is illegal then rows will be calculated automatically. appliable SymbologyType: Pdf417
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
.
getSupplementData
in interface IBarCodeControl
public float getSupplementSpace()
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter
See System.Drawing.GraphicsUnit
.
See SupplementData
.
getSupplementSpace
in interface IBarCodeControl
public long getSymbologyType()
getSymbologyType
in interface IBarCodeControl
public int getTextRenderingHint()
Specifies the quality of text rendering.
getTextRenderingHint
in interface IBarCodeControl
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
.
getWideNarrowRatio
in interface IBarCodeControl
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
.
getxDimension
in interface IBarCodeControl
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
.
getyDimension
in interface IBarCodeControl
public static boolean isLicensed()
Gets a value indicating whether generation module is licensed.
Value:true
if generation module is licensed; otherwise, false
.public void rotate()
Rotate com.aspose.barcode image clockwise for 90 degrees
rotate
in interface IBarCodeControl
public void rotate(float angle)
Rotate com.aspose.barcode image clockwise
rotate
in interface IBarCodeControl
angle
- Rotation Anglepublic void rotate(int angle)
Rotate the com.aspose.barcode image
rotate
in interface IBarCodeControl
angle
- either 0, 90, 180 or 270 degreepublic void rotate(int direction, float angle)
Rotate the com.aspose.barcode image
rotate
in interface IBarCodeControl
direction
- rotation directionangle
- rotation anglepublic void rotate(int direction, int angle)
Rotate the com.aspose.barcode image
rotate
in interface IBarCodeControl
direction
- specify clockwise or anti-clockwiseangle
- either 0, 90, 180 or 270 degreepublic void save(java.io.OutputStream stream, int format) throws java.io.IOException
Save BarCodeImage to stream in specific format
java.io.IOException
public void save(java.lang.String filename)
Save BarCodeImage to specific file in specific format
save
in interface IBarCodeControl
filename
- save to this file pathpublic void saveImageAs(java.lang.String filename)
Save the com.aspose.barcode image
filename
- Full path of the target image filepublic void setAlwaysShowChecksum(boolean value)
Always display checksum digit in the humanreadable text for Code128 and EAN128 barcodes.
public void setAspectRatio(float value)
setAspectRatio
in interface IBarCodeControl
public void setAustralianPosteParcelCodeSet(int value)
public void setAustraliaPostFormatControlCode(int value)
setAustraliaPostFormatControlCode
in interface IBarCodeControl
public void setAutoSize(boolean value)
setAutoSize
in interface IBarCodeControl
public void setAztectErrorLevel(int value)
Level of error corection of Aztect types of com.aspose.barcode. value should between 10 to 95
public void setBackColor(java.awt.Color value)
Background color of the com.aspose.barcode image
setBackColor
in interface IBarCodeControl
public void setBarHeight(float value)
setBarHeight
in interface IBarCodeControl
public void setBorderColor(java.awt.Color value)
setBorderColor
in interface IBarCodeControl
public void setBorderDashStyle(int value)
setBorderDashStyle
in interface IBarCodeControl
public void setBorderVisible(boolean value)
setBorderVisible
in interface IBarCodeControl
public void setBorderWidth(float value)
setBorderWidth
in interface IBarCodeControl
public void setCaptionAbove(Caption value)
setCaptionAbove
in interface IBarCodeControl
public void setCaptionBelow(Caption value)
setCaptionBelow
in interface IBarCodeControl
public void setCodabarStartSymbol(short value)
setCodabarStartSymbol
in interface IBarCodeControl
public void setCodabarStopSymbol(short value)
setCodabarStopSymbol
in interface IBarCodeControl
public void setCode128CodeSet(int value)
setCode128CodeSet
in interface IBarCodeControl
public void setCodeLocation(int value)
setCodeLocation
in interface IBarCodeControl
public void setCodeText(byte[] codeText)
Set the data to be encoded.
codeText
- The data to be encoded.public void setCodeText(java.lang.String value)
setCodeText
in interface IBarCodeControl
public void setCodeTextAlignment(int value)
setCodeTextAlignment
in interface IBarCodeControl
public void setCodeTextColor(java.awt.Color value)
setCodeTextColor
in interface IBarCodeControl
public void setCodeTextFont(java.awt.Font value)
setCodeTextFont
in interface IBarCodeControl
public void setCodeTextMsFont(Font value)
public void setCodeTextSpace(float value)
setCodeTextSpace
in interface IBarCodeControl
public void setColumns(int value)
2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417
setColumns
in interface IBarCodeControl
public void setDataMatrixEncodeMode(int value)
Encode mode of Datamatrix com.aspose.barcode, default to Auto
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.setDisplay2DText
in interface IBarCodeControl
public void setEAN128EncodeMode(int value)
public void setEnableChecksum(int value)
setEnableChecksum
in interface IBarCodeControl
public void setEnableEscape(boolean value)
setEnableEscape
in interface IBarCodeControl
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
setForeColor
in interface IBarCodeControl
public void setGraphicsUnit(int value)
setGraphicsUnit
in interface IBarCodeControl
public void setImageHeight(float value)
setImageHeight
in interface IBarCodeControl
public void setImageQuality(int value)
setImageQuality
in interface IBarCodeControl
@Deprecated public void setImageUnit(int value)
public void setImageWidth(float value)
setImageWidth
in interface IBarCodeControl
public void setITF14BorderType(int value)
public void setMacroPdf417FileID(int value)
Sets macro pdf417 com.aspose.barcode's file ID.
public void setMacroPdf417LastSegment(boolean value)
Sets whether this macro pdf417 com.aspose.barcode is the last segment.
public void setMacroPdf417SegmentID(int value)
Sets macro pdf417 com.aspose.barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
public void setPdf417CompactionMode(int value)
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>
setPdf417CompactionMode
in interface IBarCodeControl
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
setPdf417ErrorLevel
in interface IBarCodeControl
public void setPdf417Truncate(boolean value)
whether pdf417 symbology type of BarCode is truncated (to reduce space)
setPdf417Truncate
in interface IBarCodeControl
public void setPlanetShortBarHeight(float value)
setPlanetShortBarHeight
in interface IBarCodeControl
public void setPostnetShortBarHeight(float value)
setPostnetShortBarHeight
in interface IBarCodeControl
public void setPrinterName(java.lang.String value)
public void setQREncodeMode(int value)
QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode>
See Aspose.BarCode.QREncodeMode
.
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
.
public void setResolution(Resolution value)
Sets the resolution of the BarCode image
See Resolution
.
setResolution
in interface IBarCodeControl
@Deprecated public void setRotationAngle(int value)
public void setRotationAngleF(float value)
setRotationAngleF
in interface IBarCodeControl
public void setRows(int value)
2D BarCode's rows, if setting is illegal then rows will be calculated automatically. appliable SymbologyType: Pdf417
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
.
setSupplementData
in interface IBarCodeControl
public void setSupplementSpace(float value)
setSupplementSpace
in interface IBarCodeControl
public void setSymbologyType(long value)
setSymbologyType
in interface IBarCodeControl
public void setTextRenderingHint(int value)
setTextRenderingHint
in interface IBarCodeControl
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
.
setWideNarrowRatio
in interface IBarCodeControl
public void setxDimension(float value)
setxDimension
in interface IBarCodeControl
public void setyDimension(float value)
setyDimension
in interface IBarCodeControl
public java.lang.String toString()
overried to string method
toString
in class java.lang.Object