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 imagecom.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar); b.setCodeText("12345678"); b.save("test.bmp");
Modifier and Type | Field and Description |
---|---|
boolean |
pdf417Truncate |
Constructor and Description |
---|
BarCodeBuilder()
Initializes a new instance of the BarCodeBuilder class
, default SymbologyType is Code128,
default CodeText is 12345678.
|
BarCodeBuilder(String codeText)
Initializes a new instance of the BarCodeBuilder} class with codetext
, default SymbologyType is Code128.
|
BarCodeBuilder(String codeText,
long type)
Initializes a new instance of the BarCodeBuilder class.
|
Modifier and Type | Method and Description |
---|---|
BufferedImage |
generateBarCodeImage()
Generate the BarCode image under current settings
|
boolean |
getAlwaysShowChecksum()
Always display checksum digit in the humanreadable text for Code128 and GS1Code128 barcodes.
|
float |
getAspectRatio()
2D BarCode's module's height/width ratio (yDimension/xDimension).
|
int |
getAustraliaPostFormatControlCode()
Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"
|
boolean |
getAutoSize()
Adjusts the image's size automatically.
|
int |
getAztectErrorLevel()
Level of error corection of Aztect types of barcode.
|
Color |
getBackColor()
Background color of the barcode image
See System.Drawing.Color.
|
BufferedImage |
getBarCodeImage()
Get the BarCode image under current settings
|
float |
getBarHeight()
height of 1D barcodes' bars.
|
Color |
getBorderColor()
BarCode Image's border's color
See BorderWidth.
|
int |
getBorderDashStyle()
BarCode Image's border's style
See BorderWidth.
|
boolean |
getBorderVisible()
Gets a value indicating whether [border visible].
|
float |
getBorderWidth()
BarCode Image's border's width
Default Graphics Unit: Millimeter
See BorderVisible.
|
Caption |
getCaptionAbove()
Caption Above the BarCode image.
|
Caption |
getCaptionBelow()
Caption Below the BarCode image.
|
short |
getCodabarStartSymbol()
Start symbol (character) of codabar symbology
See CodabarStopSymbol}.
|
short |
getCodabarStopSymbol()
Stop symbol (character) of codabar symbology
See CodabarStartSymbol.
|
int |
getCodeLocation()
Specify the displaying CodeText's Location, set to CodeLocation.None to hide CodeText.
|
String |
getCodeText()
Data to be encoded, different types of BarCode may have different CodeText length restrictions
See EnableEscape.
|
int |
getCodeTextAlignment()
Gets the alignment of the code text.
|
Color |
getCodeTextColor()
Specify the displaying CodeText's Color
See System.Drawing.Color.
|
Charset |
getCodeTextEncoding()
Gets the encoding of codetext.
|
Font |
getCodeTextFont()
Specify the displaying CodeText's font
See CodeText.
|
float |
getCodeTextSpace()
Space between the CodeText and the BarCode.
|
int |
getColumns()
2D BarCode's columns, if setting is illegal then columns will be calculated automatically
appliable SymbologyType: Pdf417
|
BufferedImage |
getCustomSizeBarCodeImage(Dimension customBarCodeSize,
boolean allowSpaceAround)
Gets the scaled barcode image.
|
int |
getDatamatrixEcc()
Gets a Datamatri ECC type.
|
int |
getDataMatrixEncodeMode()
Encode mode of Datamatrix barcode, default to Auto
|
String |
getDisplay2DText()
Gets the text will displayed on the barcode's image.
|
int |
getECIEncoding()
Extended Channel Interpretation Identifiers.
|
int |
getEnableChecksum() |
boolean |
getEnableEscape()
Indicates whether explains the character "\" as an escape character in CodeText property.
|
boolean |
getFilledBars()
Only for 1D barcodes.
|
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.
|
int |
getGraphicsUnit()
Measurement of various properties such as Width, Height etc.
|
float |
getImageHeight()
BarCode image's height See AutoSize., if AutoSize is true, ImageHeight will
be increased accordingly
Default Graphics Unit: Millimeter
|
int |
getImageQuality()
Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias.
|
float |
getImageWidth()
BarCode image's width See AutoSize}., if AutoSize is true, ImageWidth will
be increased accordingly
Default Graphics Unit: Millimeter
|
float |
getITF14BorderThickness()
Gets or sets an ITF14 border (bearer bar) thickness.
|
int |
getITF14BorderType()
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
|
int |
getMacroPdf417FileID()
Gets macro pdf417 barcode's file ID.
|
int |
getMacroPdf417SegmentID()
Gets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
|
int |
getMacroPdf417SegmentsCount()
Gets macro pdf417 barcode segments count.
|
MarginsF |
getMargins()
Margin area around the core BarCode image
If AutoSize is false, then Width and Height is fixed, thus Margins setting will be ignored
Default Graphics Unit: Millimeter
|
BufferedImage |
getOnlyBarCodeImage()
Gets the only barcode image.
|
BufferedImage |
getOnlyBarCodeImage(int scaleFactor)
Gets the only barcode image.
|
int |
getPdf417CompactionMode()
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is
|
int |
getPdf417ErrorLevel()
Gets Pdf417 symbology type of BarCode's error coccrection level
ranging from level0 to level8, level0 means no error correction info,
level8 means best error correction which means a larger picture
|
boolean |
getPdf417Truncate()
whether pdf417 symbology type of BarCode is truncated (to reduce space)
|
float |
getPlanetShortBarHeight()
Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
|
float |
getPostnetShortBarHeight()
Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch).
|
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
|
int |
getQREncodeType()
QR / MicroQR selector mode.
|
int |
getQRErrorLevel()
Level of Reed-Solomon error correction for QR barcode.
|
Resolution |
getResolution()
Gets the resolution of the BarCode image
See Resolution.
|
float |
getRotationAngleF()
BarCode image's rotation angle, measured in degree, e.g.
|
int |
getRows()
BarCode's rows, if setting is illegal then rows will be calculated automatically.
|
String |
getSupplementData()
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
|
float |
getSupplementSpace()
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter
See System.Drawing.GraphicsUnit.
|
long |
getSymbologyType()
BarCode's symbology, type: com.aspose.barcode.Symbology.
|
int |
getTextRenderingHint()
Specifies the quality of text rendering.
|
boolean |
getThrowExceptionWhenCodeTextIncorrect()
Only for 1D barcodes.
|
float |
getWideNarrowRatio()
Wide bars to Narrow bars ratio for some 1D BarCode.
|
float |
getxDimension()
x-dimension, smallest width unit of BarCode's bars or spaces.
|
float |
getyDimension()
y-dimension, smallest height unit of 2D BarCode's modules.
|
static boolean |
isLicensed()
Gets a value indicating whether generation module is licensed.
|
void |
print()
Print BarCodeImage
See PrinterName}.
|
void |
rotate()
Rotate barcode image clockwise for 90 degrees
|
void |
rotate(float angle)
Rotate barcode image clockwise
|
void |
rotate(int direction,
float angle)
Rotate the barcode image
|
void |
save(OutputStream stream,
int format)
Save BarCodeImage to stream in specific format
|
void |
save(String filename)
Save BarCodeImage to specific file in specific format
|
void |
save(String filename,
com.aspose.barcode.ImageFormat format)
Save BarCodeImage to specific file in specific format
|
void |
save(String filename,
int format)
Save BarCodeImage to specific file in specific format
|
void |
saveAsEmf(InputStream stream)
Save the BarCode as Emf to stream.
|
void |
saveAsEmf(String fileName)
Save the BarCode as Emf file using given file name.
|
void |
setAlwaysShowChecksum(boolean value)
Always display checksum digit in the humanreadable text for Code128 and GS1Code128 barcodes.
|
void |
setAspectRatio(float value)
2D BarCode's module's height/width ratio (yDimension/xDimension).
|
void |
setAustraliaPostFormatControlCode(int value)
Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"
|
void |
setAutoSize(boolean value)
Adjusts the image's size automatically.
|
void |
setAztectErrorLevel(int value)
Level of error corection of Aztect types of barcode.
|
void |
setBackColor(Color value)
Background color of the barcode image
See System.Drawing.Color.
|
void |
setBarHeight(float value)
height of 1D barcodes' bars.
|
void |
setBinaryCodeText(byte[] codeText)
Set the binary data to be encoded.
|
void |
setBorderColor(Color value)
BarCode Image's border's color
See BorderWidth.
|
void |
setBorderDashStyle(int value)
BarCode Image's border's style
See BorderWidth.
|
void |
setBorderVisible(boolean value)
Sets a value indicating whether [border visible].
|
void |
setBorderWidth(float value)
BarCode Image's border's width
Default Graphics Unit: Millimeter
See BorderVisible.
|
void |
setCaptionAbove(Caption value)
Caption Above the BarCode image.
|
void |
setCaptionBelow(Caption value)
Caption Below the BarCode image.
|
void |
setCodabarStartSymbol(short value)
Start symbol (character) of codabar symbology
See CodabarStopSymbol}.
|
void |
setCodabarStopSymbol(short value)
Stop symbol (character) of codabar symbology
See CodabarStartSymbol.
|
void |
setCodeLocation(int value)
Specify the displaying CodeText's Location, set to CodeLocation.None to hide CodeText.
|
void |
setCodeText(String value)
Data to be encoded, different types of BarCode may have different CodeText length restrictions
See EnableEscape.
|
void |
setCodeTextAlignment(int value)
Sets the alignment of the code text.
|
void |
setCodeTextColor(Color value)
Specify the displaying CodeText's Color
See System.Drawing.Color.
|
void |
setCodeTextEncoding(Charset value)
Sets the encoding of codetext.
|
void |
setCodeTextFont(Font value)
Specify the displaying CodeText's font
See CodeText.
|
void |
setCodeTextSpace(float value)
Space between the CodeText and the BarCode.
|
void |
setColumns(int value)
2D BarCode's columns, if setting is illegal then columns will be calculated automatically
appliable SymbologyType: Pdf417
|
void |
setDatamatrixEcc(int value)
Sets a Datamatri ECC type.
|
void |
setDataMatrixEncodeMode(int value)
Encode mode of Datamatrix barcode, default to Auto
|
void |
setDisplay2DText(String value)
Sets the text will displayed on the barcode's image.
|
void |
setECIEncoding(int value) |
void |
setEnableChecksum(int value) |
void |
setEnableEscape(boolean value)
Indicates whether explains the character "\" as an escape character in CodeText property.
|
void |
setFilledBars(boolean value)
Only for 1D barcodes.
|
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.
|
void |
setGraphicsUnit(int value)
Measurement of various properties such as Width, Height etc.
|
void |
setImageHeight(float value)
BarCode image's height See AutoSize., if AutoSize is true, ImageHeight will
be increased accordingly
Default Graphics Unit: Millimeter
|
void |
setImageQuality(int value)
Graphics quality mode, when RotationAngleF not equal to 0, 90, 180 or 270, do set quality mode to anti-alias.
|
void |
setImageWidth(float value)
BarCode image's width See AutoSize}., if AutoSize is true, ImageWidth will
be increased accordingly
Default Graphics Unit: Millimeter
|
void |
setITF14BorderThickness(float value)
Gets or sets an ITF14 border (bearer bar) thickness.
|
void |
setITF14BorderType(int value)
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
|
void |
setMacroPdf417FileID(int value)
Sets macro pdf417 barcode's file ID.
|
void |
setMacroPdf417SegmentID(int value)
Sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
|
void |
setMacroPdf417SegmentsCount(int value)
Sets macro pdf417 barcode segments count.
|
void |
setMargins(MarginsF value)
Margin area around the core BarCode image
If AutoSize is false, then Width and Height is fixed, thus Margins setting will be ignored
Default Graphics Unit: Millimeter
|
void |
setPdf417CompactionMode(int value)
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is
|
void |
setPdf417ErrorLevel(int value)
Sets Pdf417 symbology type of BarCode's error coccrection level
ranging from level0 to level8, level0 means no error correction info,
level8 means best error correction which means a larger picture
|
void |
setPdf417Truncate(boolean value)
whether pdf417 symbology type of BarCode is truncated (to reduce space)
|
void |
setPlanetShortBarHeight(float value)
Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
|
void |
setPostnetShortBarHeight(float value)
Short bar's height of Postnet barcode, it has to be between 1 millimeter and 1.5 milimeter (0.04 inch and 0.06 inch).
|
void |
setPrinterName(String value)
Choose printer, if not specified, Print() method will choose the first available printer
|
void |
setQREncodeMode(int value)
QR symbology type of BarCode's encoding mode, default mode is
|
void |
setQREncodeType(int value) |
void |
setQRErrorLevel(int value)
Level of Reed-Solomon error correction for QR barcode.
|
void |
setResolution(Resolution value)
Sets the resolution of the BarCode image
See Resolution.
|
void |
setRotationAngleF(float value)
BarCode image's rotation angle, measured in degree, e.g.
|
void |
setRows(int value)
BarCode's rows, if setting is illegal then rows will be calculated automatically.
|
void |
setSupplementData(String value)
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
|
void |
setSupplementSpace(float value)
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter
See System.Drawing.GraphicsUnit.
|
void |
setSymbologyType(long value)
BarCode's symbology, type: com.aspose.barcode.Symbology.
|
void |
setTextRenderingHint(int value)
Specifies the quality of text rendering.
|
void |
setThrowExceptionWhenCodeTextIncorrect(boolean value)
Only for 1D barcodes.
|
void |
setWideNarrowRatio(float value)
Wide bars to Narrow bars ratio for some 1D BarCode.
|
void |
setxDimension(float value)
x-dimension, smallest width unit of BarCode's bars or spaces.
|
void |
setyDimension(float value)
y-dimension, smallest height unit of 2D BarCode's modules.
|
String |
toString()
overried to string method
|
public BarCodeBuilder()
Initializes a new instance of the BarCodeBuilder class , default SymbologyType is Code128, default CodeText is 12345678.
public BarCodeBuilder(String codeText)
Initializes a new instance of the BarCodeBuilder} class with codetext , default SymbologyType is Code128.
codeText
- string text data to be encodedpublic BarCodeBuilder(String codeText, long type)
Initializes a new instance of the BarCodeBuilder class.
codeText
- string text data to be encodedtype
- BarCode's type: Aspose.BarCode.SymbologyTypepublic static boolean isLicensed()
Gets a value indicating whether generation module is licensed.
Value: true if generation module is licensed; otherwise, false.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 imagecom.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar); b.setCodeText("12345678"); b.save("test.bmp");
getSymbologyType
in interface IBarCodeControl
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 imagecom.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar); b.setCodeText("12345678"); b.save("test.bmp");
setSymbologyType
in interface IBarCodeControl
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 imagecom.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar); b.setCodeText("12345678"); b.save("test.bmp");
getCodeText
in interface IBarCodeControl
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 imagecom.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar); b.setCodeText("12345678"); b.save("test.bmp");
setCodeText
in interface IBarCodeControl
public void setBinaryCodeText(byte[] codeText)
Set the binary data to be encoded.
codeText
- The binary data to be encoded.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.getDisplay2DText
in interface IBarCodeControl
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.setDisplay2DText
in interface IBarCodeControl
public Charset getCodeTextEncoding()
Gets the encoding of codetext.
Value: The encoding for codetext.public void setCodeTextEncoding(Charset value)
Sets the encoding of codetext.
Value: The encoding for codetext.public boolean getEnableEscape()
Indicates whether explains the character "\" as an escape character in CodeText property.
See CodeText.
getEnableEscape
in interface IBarCodeControl
public void setEnableEscape(boolean value)
Indicates whether explains the character "\" as an escape character in CodeText property.
See CodeText.
setEnableEscape
in interface IBarCodeControl
public Font getCodeTextFont()
Specify the displaying CodeText's font See CodeText. See System.Drawing.Font. See CodeTextColor. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.
getCodeTextFont
in interface IBarCodeControl
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.
setCodeTextFont
in interface IBarCodeControl
value
- CodeTextFontpublic Color getCodeTextColor()
Specify the displaying CodeText's Color See System.Drawing.Color. See CodeText. See CodeTextFont. See CodeLocation. See CodeTextSpace. See CodeTextAlignment.
getCodeTextColor
in interface IBarCodeControl
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.
setCodeTextColor
in interface IBarCodeControl
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.
getCodeLocation
in interface IBarCodeControl
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.
setCodeLocation
in interface IBarCodeControl
public int getCodeTextAlignment()
Gets the alignment of the code text. See System.Drawing.StringAlignment. See CodeText. See CodeTextFont. See CodeTextColor. See CodeTextSpace.
getCodeTextAlignment
in interface IBarCodeControl
public void setCodeTextAlignment(int value)
Sets the alignment of the code text. See System.Drawing.StringAlignment. See CodeText. See CodeTextFont. See CodeTextColor. See CodeTextSpace.
setCodeTextAlignment
in interface IBarCodeControl
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 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
setRotationAngleF
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
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);
getCaptionAbove
in interface IBarCodeControl
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);
setCaptionAbove
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
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);
getCaptionBelow
in interface IBarCodeControl
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);
setCaptionBelow
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 void setGraphicsUnit(int value)
Measurement of various properties such as Width, Height etc. Default GraphicsUnit: Millimeter See System.Drawing.GraphicsUnit.
setGraphicsUnit
in interface IBarCodeControl
public Resolution getResolution()
Gets the resolution of the BarCode image See Resolution.
getResolution
in interface IBarCodeControl
public void setResolution(Resolution value)
Sets the resolution of the BarCode image See Resolution.
setResolution
in interface IBarCodeControl
public String getPrinterName()
Choose printer, if not specified, Print() method will choose the first available printer
public void setPrinterName(String value)
Choose printer, if not specified, Print() method will choose the first available printer
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
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.
setImageQuality
in interface IBarCodeControl
public int getTextRenderingHint()
Specifies the quality of text rendering.
getTextRenderingHint
in interface IBarCodeControl
public void setTextRenderingHint(int value)
Specifies the quality of text rendering.
setTextRenderingHint
in interface IBarCodeControl
public boolean getAutoSize()
Adjusts the image's size automatically. Recommended: true. Default value is true.
getAutoSize
in interface IBarCodeControl
public void setAutoSize(boolean value)
Adjusts the image's size automatically. Recommended: true. Default value is true.
setAutoSize
in interface IBarCodeControl
public float getImageWidth()
BarCode image's width See AutoSize}., if AutoSize is true, ImageWidth will be increased accordingly Default Graphics Unit: Millimeter
getImageWidth
in interface IBarCodeControl
public void setImageWidth(float value)
BarCode image's width See AutoSize}., if AutoSize is true, ImageWidth will be increased accordingly Default Graphics Unit: Millimeter
setImageWidth
in interface IBarCodeControl
public float getImageHeight()
BarCode image's height See AutoSize., if AutoSize is true, ImageHeight will be increased accordingly Default Graphics Unit: Millimeter
getImageHeight
in interface IBarCodeControl
public void setImageHeight(float value)
BarCode image's height See AutoSize., if AutoSize is true, ImageHeight will be increased accordingly Default Graphics Unit: Millimeter
setImageHeight
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 void setBorderWidth(float value)
BarCode Image's border's width Default Graphics Unit: Millimeter See BorderVisible. See BorderDashStyle. See BorderColor.
setBorderWidth
in interface IBarCodeControl
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.
getxDimension
in interface IBarCodeControl
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.
setxDimension
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 barcode, y-dimension * rows determines BarCode's height In 1D barcode, BarHeight determines BarCode's height. Default Graphics Unit: Millimeter See xDimension. See BarHeight.
getyDimension
in interface IBarCodeControl
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.
setyDimension
in interface IBarCodeControl
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.
getBarHeight
in interface IBarCodeControl
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.
setBarHeight
in interface IBarCodeControl
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 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.
setAspectRatio
in interface IBarCodeControl
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 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
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 void setSupplementSpace(float value)
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter See System.Drawing.GraphicsUnit. See SupplementData.
setSupplementSpace
in interface IBarCodeControl
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.
getPostnetShortBarHeight
in interface IBarCodeControl
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.
setPostnetShortBarHeight
in interface IBarCodeControl
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.
getPlanetShortBarHeight
in interface IBarCodeControl
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.
setPlanetShortBarHeight
in interface IBarCodeControl
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 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.
setCodeTextSpace
in interface IBarCodeControl
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");
getBarCodeImage
in interface IBarCodeControl
public boolean getBorderVisible()
Gets a value indicating whether [border visible].
Value: true} if [border visible]; otherwise, false.getBorderVisible
in interface IBarCodeControl
public void setBorderVisible(boolean value)
Sets a value indicating whether [border visible].
Value: true} if [border visible]; otherwise, false}.setBorderVisible
in interface IBarCodeControl
public Color getBorderColor()
BarCode Image's border's color See BorderWidth. See BorderVisible. See BorderDashStyle
getBorderColor
in interface IBarCodeControl
public void setBorderColor(Color value)
BarCode Image's border's color See BorderWidth. See BorderVisible. See BorderDashStyle
setBorderColor
in interface IBarCodeControl
public int getBorderDashStyle()
BarCode Image's border's style See BorderWidth. See BorderVisible. See BorderColor
getBorderDashStyle
in interface IBarCodeControl
public void setBorderDashStyle(int value)
BarCode Image's border's style See BorderWidth. See BorderVisible. See BorderColor
setBorderDashStyle
in interface IBarCodeControl
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");
getCodabarStartSymbol
in interface IBarCodeControl
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");
setCodabarStartSymbol
in interface IBarCodeControl
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");
getCodabarStopSymbol
in interface IBarCodeControl
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");
setCodabarStopSymbol
in interface IBarCodeControl
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");
getAustraliaPostFormatControlCode
in interface IBarCodeControl
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");
setAustraliaPostFormatControlCode
in interface IBarCodeControl
public int getITF14BorderType()
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
public void setITF14BorderType(int value)
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
public float getITF14BorderThickness()
Gets or sets an ITF14 border (bearer bar) thickness. Default value is -1, this means that the thickness is calculated automatically
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
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.
getForeColor
in interface IBarCodeControl
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.
setForeColor
in interface IBarCodeControl
public Color getBackColor()
Background color of the barcode image See System.Drawing.Color.
getBackColor
in interface IBarCodeControl
public void setBackColor(Color value)
Background color of the barcode image See System.Drawing.Color.
setBackColor
in interface IBarCodeControl
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 void setEnableChecksum(int value)
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
setEnableChecksum
in interface IBarCodeControl
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.
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.
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 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 int getRows()
BarCode's rows, if setting is illegal then rows will be calculated automatically. Applicable Symbology: Pdf417, DatabarExpandedStacked
public void setRows(int value)
BarCode's rows, if setting is illegal then rows will be calculated automatically. Applicable Symbology: Pdf417, DatabarExpandedStacked
public int getDataMatrixEncodeMode()
Encode mode of Datamatrix barcode, default to Auto
public void setDataMatrixEncodeMode(int value)
Encode mode of Datamatrix barcode, default to Auto
public int getPdf417CompactionMode()
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is
getPdf417CompactionMode
in interface IBarCodeControl
public void setPdf417CompactionMode(int value)
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is
setPdf417CompactionMode
in interface IBarCodeControl
public boolean getPdf417Truncate()
whether pdf417 symbology type of BarCode is truncated (to reduce space)
getPdf417Truncate
in interface IBarCodeControl
public void setPdf417Truncate(boolean value)
whether pdf417 symbology type of BarCode is truncated (to reduce space)
setPdf417Truncate
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 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 int getMacroPdf417SegmentsCount()
Gets macro pdf417 barcode segments count.
public void setMacroPdf417SegmentsCount(int value)
Sets macro pdf417 barcode segments count.
public int getMacroPdf417SegmentID()
Gets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
public void setMacroPdf417SegmentID(int value)
Sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
public int getMacroPdf417FileID()
Gets macro pdf417 barcode's file ID.
public void setMacroPdf417FileID(int value)
Sets macro pdf417 barcode's file ID.
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
getWideNarrowRatio
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
setWideNarrowRatio
in interface IBarCodeControl
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");
getSupplementData
in interface IBarCodeControl
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");
setSupplementData
in interface IBarCodeControl
public int getQRErrorLevel()
Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see QRErrorLevel.
public void setQRErrorLevel(int value)
Level of Reed-Solomon error correction for QR barcode. From low to high: LevelL, LevelM, LevelQ, LevelH. see QRErrorLevel.
public int getQREncodeMode()
QR symbology type of BarCode's encoding mode, default mode is
public void setQREncodeMode(int value)
QR symbology type of BarCode's encoding mode, default mode is
public int getQREncodeType()
QR / MicroQR selector mode. Select ForceQR for standard QR symbols, Auto for MicroQR.
Example how to encode MicroQRBarCodeBuilder 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 QRBarCodeBuilder 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();
public void setQREncodeType(int value)
public int getECIEncoding()
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 encodingBarCodeBuilder 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();
public void setECIEncoding(int value)
public int getAztectErrorLevel()
Level of error corection of Aztect types of barcode. value should between 10 to 95
public void setAztectErrorLevel(int value)
Level of error corection of Aztect types of barcode. value should between 10 to 95
public boolean getAlwaysShowChecksum()
Always display checksum digit in the humanreadable text for Code128 and GS1Code128 barcodes.
public void setAlwaysShowChecksum(boolean value)
Always display checksum digit in the humanreadable text for Code128 and GS1Code128 barcodes.
public BufferedImage generateBarCodeImage()
Generate the BarCode image under current settings
public void saveAsEmf(String fileName)
Save the BarCode as Emf file using given file name.
fileName
- The file name.public void saveAsEmf(InputStream stream)
Save the BarCode as Emf to stream.
stream
- System.IO.Streampublic void rotate()
Rotate barcode image clockwise for 90 degrees
rotate
in interface IBarCodeControl
public void rotate(float angle)
Rotate barcode image clockwise
rotate
in interface IBarCodeControl
angle
- Rotation Anglepublic void rotate(int direction, float angle)
Rotate the barcode image
rotate
in interface IBarCodeControl
direction
- rotation directionangle
- rotation anglepublic void print() throws PrintException
Print BarCodeImage See PrinterName}.
BarCodeBuilder b = new BarCodeBuilder(); b.setCodeText("123456"); b.setSymbologyType(SymbologyType.Pdf417); b.print()
PrintException
public BufferedImage getOnlyBarCodeImage()
Gets the only barcode image. Requires license.
BarCodeException
- Throws exception if no license set.public BufferedImage getOnlyBarCodeImage(int scaleFactor)
Gets the only 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 BufferedImage getCustomSizeBarCodeImage(Dimension customBarCodeSize, boolean allowSpaceAround)
Gets the scaled barcode image.
customBarCodeSize
- BarCode full image size. Default Graphics Unit: Millimeter.allowSpaceAround
- if set to true} allow space around the barcode.public void save(OutputStream stream, int format) throws IOException
Save BarCodeImage to stream in specific format
save
in interface IBarCodeControl
stream
- java.io.OutputStreamformat
- Specifies the file format of the image.IOException
public void save(String filename)
Save BarCodeImage to specific file in specific format
save
in interface IBarCodeControl
filename
- save to this file pathpublic void save(String filename, com.aspose.barcode.ImageFormat format) throws IOException
Save BarCodeImage to specific file in specific format
save
in interface IBarCodeControl
filename
- save to this file pathformat
- System.Drawing.Imaging.ImageFormatIOException
public void save(String filename, int format) throws IOException
Save BarCodeImage to specific file in specific format
save
in interface IBarCodeControl
filename
- save to this file pathformat
- Specifies the file format of the image. Enumerated in BarCodeImageFormat.IOException
public String toString()
overried to string method
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
.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
.public int getDatamatrixEcc()
Gets a Datamatri ECC type. Default value is ECC200
public void setDatamatrixEcc(int value)
Sets a Datamatri ECC type. Default value is ECC200
Copyright (c) 2002-2015 Aspose Pty Ltd. All Rights Reserved.