public class BarCodeBuilder extends Object implements IBarCodeControl, com.aspose.ms.System.IDisposable
BarCodeBuilder for backend barcode images generation.
supported symbology: 1D: Codabar, Code11, Code128, Code39Standard, Code39Extended Code93Standard, Code93Extended, EAN13, EAN8, Interleaved2of5, MSI, Standard2of5, UPCA, UPCE, ISBN, GS1Code128, Postnet, Planet EAN14, SCC14, SSCC18, ITF14, SingaporePost 2D: DataMatrix, PDf417, QR code
Create and save a BarCode image[Java] com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar); b.setCodeText("12345678"); b.save("test.bmp");
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 |
---|---|
void |
dispose() |
BufferedImage |
generateBarCodeImage() |
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()
Wether ajust image's size automatically.
|
int |
getAztectErrorLevel()
Level of error corection of Aztect types of barcode.
|
Color |
getBackColor() |
BufferedImage |
getBarCodeImage() |
float |
getBarHeight()
height of 1D barcodes' bars.
|
Color |
getBorderColor() |
int |
getBorderDashStyle()
BarCode Image's border's style
See
BorderWidth . |
boolean |
getBorderVisible()
Gets or sets 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 or sets the alignment of the code text.
|
Color |
getCodeTextColor() |
Charset |
getCodeTextEncoding() |
Font |
getCodeTextFont() |
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) |
int |
getDataMatrixEncodeMode()
Encode mode of Datamatrix barcode, default to Auto
|
String |
getDisplay2DText()
Gets or sets the text will displayed on the barcode's image.
|
int |
getEnableChecksum() |
boolean |
getEnableEscape()
Indicates whether explains the character "\" as an escape character in CodeText property.
|
Color |
getForeColor() |
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 |
int |
getITF14BorderType()
Border type of ITF14 barcode, quiet zone will be determined by margin settings.
|
int |
getMacroPdf417FileID()
Gets or sets macro pdf417 barcode's file ID.
|
int |
getMacroPdf417SegmentID()
Gets or sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
|
int |
getMacroPdf417SegmentsCount()
Gets or sets 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() |
BufferedImage |
getOnlyBarCodeImage(int scaleFactor) |
int |
getPdf417CompactionMode()
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is
<bode>Auto</bode> |
int |
getPdf417ErrorLevel()
Gets or 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
|
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
<bode>Auto</bode> |
int |
getQRErrorLevel()
Level of Reed-Solomon error correction for QR barcode.
|
Resolution |
getResolution()
Gets or sets the resolution of the BarCode image
See
Resolution . |
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.
|
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: Aspose.BarCode.SymbologyType.
|
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 |
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,
com.aspose.ms.System.Drawing.Imaging.ImageFormat format) |
void |
save(OutputStream stream,
int format) |
void |
save(String filename)
Save BarCodeImage to specific file in specific format
|
void |
save(String filename,
com.aspose.ms.System.Drawing.Imaging.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 |
setAlwaysShowChecksum(boolean value) |
void |
setAspectRatio(float value) |
void |
setAustraliaPostFormatControlCode(int value) |
void |
setAutoSize(boolean value) |
void |
setAztectErrorLevel(int value) |
void |
setBackColor(Color value) |
void |
setBarHeight(float value) |
void |
setBinaryCodeText(byte[] codeText)
Set the binary data to be encoded.
|
void |
setBorderColor(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 |
setCodeLocation(int value) |
void |
setCodeText(String value) |
void |
setCodeTextAlignment(int value) |
void |
setCodeTextColor(Color value) |
void |
setCodeTextEncoding(Charset value) |
void |
setCodeTextFont(Font value) |
void |
setCodeTextSpace(float value) |
void |
setColumns(int value) |
void |
setDataMatrixEncodeMode(int value) |
void |
setDisplay2DText(String value) |
void |
setEnableChecksum(int value) |
void |
setEnableEscape(boolean value) |
void |
setForeColor(Color value) |
void |
setGraphicsUnit(int value) |
void |
setImageHeight(float value) |
void |
setImageQuality(int value) |
void |
setImageWidth(float value) |
void |
setITF14BorderType(int value) |
void |
setMacroPdf417FileID(int value) |
void |
setMacroPdf417SegmentID(int value) |
void |
setMacroPdf417SegmentsCount(int value) |
void |
setMargins(MarginsF value) |
void |
setPdf417CompactionMode(int value) |
void |
setPdf417ErrorLevel(int value) |
void |
setPdf417Truncate(boolean value) |
void |
setPlanetShortBarHeight(float value) |
void |
setPostnetShortBarHeight(float value) |
void |
setPrinterName(String value) |
void |
setQREncodeMode(int value) |
void |
setQRErrorLevel(int value) |
void |
setResolution(Resolution value) |
void |
setRotationAngleF(float value) |
void |
setRows(int value) |
void |
setSupplementData(String value) |
void |
setSupplementSpace(float value) |
void |
setSymbologyType(long value) |
void |
setTextRenderingHint(int value) |
void |
setThrowExceptionWhenCodeTextIncorrect(boolean value) |
void |
setWideNarrowRatio(float value) |
void |
setxDimension(float value) |
void |
setyDimension(float value) |
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: Aspose.BarCode.SymbologyType. supported symbology: 1D: Codabar, Code11, Code128, Code39Standard, Code39Extended Code93Standard, Code93Extended, EAN13, EAN8, Interleaved2of5, MSI, Standard2of5, UPCA, UPCE, EAN14, SCC14, SSCC18, ITF14, OneCode, SingaporePost 2D: DataMatrix, PDf417,MacroPDF
Create and save a BarCode image[Java] com.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)
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 image[Java] com.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)
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 or sets 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)
setDisplay2DText
in interface IBarCodeControl
public Charset getCodeTextEncoding()
public void setCodeTextEncoding(Charset value)
public boolean getEnableEscape()
Indicates whether explains the character "\" as an escape character in CodeText property.
See CodeText
.
<note>If the EnableEscape is true, "\" will be explained as a special escape character. Otherwise, "\" acts as normal characters.</note>
getEnableEscape
in interface IBarCodeControl
public void setEnableEscape(boolean value)
setEnableEscape
in interface IBarCodeControl
public Font getCodeTextFont()
getCodeTextFont
in interface IBarCodeControl
public void setCodeTextFont(Font value)
setCodeTextFont
in interface IBarCodeControl
public Color getCodeTextColor()
getCodeTextColor
in interface IBarCodeControl
public void setCodeTextColor(Color value)
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)
setCodeLocation
in interface IBarCodeControl
public int getCodeTextAlignment()
Gets or sets 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)
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)
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
[Java] com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.getCaptionAbove().setText("This is a BarCode image"); b.getCaptionAbove().setVisible(true); b.getCaptionAbove().setFont(com.aspose.ms.System.Drawing.Font.toJava(new com.aspose.ms.System.Drawing.Font("Arial", 8f))); //space between the barcode and the caption b.getCaptionAbove().setSpace(2f);
getCaptionAbove
in interface IBarCodeControl
public void setCaptionAbove(Caption value)
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
[Java] com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.getCaptionBelow().setText("This is a BarCode image"); b.getCaptionBelow().setVisible(true); b.getCaptionBelow().setFont(com.aspose.ms.System.Drawing.Font.toJava(new com.aspose.ms.System.Drawing.Font("Arial", 8f))); b.getCaptionBelow().setSpace(2f);
getCaptionBelow
in interface IBarCodeControl
public void setCaptionBelow(Caption value)
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)
setGraphicsUnit
in interface IBarCodeControl
public Resolution getResolution()
Gets or sets the resolution of the BarCode image
See Resolution
.
getResolution
in interface IBarCodeControl
public void setResolution(Resolution value)
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)
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)
setImageQuality
in interface IBarCodeControl
public int getTextRenderingHint()
Specifies the quality of text rendering.
getTextRenderingHint
in interface IBarCodeControl
public void setTextRenderingHint(int value)
setTextRenderingHint
in interface IBarCodeControl
public boolean getAutoSize()
Wether ajust image's size automatically. Recommended: true
getAutoSize
in interface IBarCodeControl
public void setAutoSize(boolean value)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
setCodeTextSpace
in interface IBarCodeControl
public BufferedImage getBarCodeImage()
getBarCodeImage
in interface IBarCodeControl
public boolean getBorderVisible()
Gets or sets a value indicating whether [border visible].
Value:true
if [border visible]; otherwise, false
.getBorderVisible
in interface IBarCodeControl
public void setBorderVisible(boolean value)
setBorderVisible
in interface IBarCodeControl
public Color getBorderColor()
getBorderColor
in interface IBarCodeControl
public void setBorderColor(Color value)
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)
setBorderDashStyle
in interface IBarCodeControl
public short getCodabarStartSymbol()
Start symbol (character) of codabar symbology
See CodabarStopSymbol
.
[Java] com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar); b.setCodabarStartSymbol(com.aspose.barcode.CodabarSymbol.A); b.setCodabarStopSymbol(com.aspose.barcode.CodabarSymbol.B); b.setCodeText("123456");
getCodabarStartSymbol
in interface IBarCodeControl
public void setCodabarStartSymbol(short value)
setCodabarStartSymbol
in interface IBarCodeControl
public short getCodabarStopSymbol()
Stop symbol (character) of codabar symbology
See CodabarStartSymbol
.
[Java] com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.Codabar); b.setCodabarStartSymbol(com.aspose.barcode.CodabarSymbol.A); b.setCodabarStopSymbol(com.aspose.barcode.CodabarSymbol.B); b.setCodeText("123456");
getCodabarStopSymbol
in interface IBarCodeControl
public void setCodabarStopSymbol(short value)
setCodabarStopSymbol
in interface IBarCodeControl
public int getAustraliaPostFormatControlCode()
Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"
[Java] com.aspose.barcode.BarCodeBuilder b = new BarCodeBuilder(); b.setSymbologyType(com.aspose.barcode.Symbology.AustraliaPost); b.setAustraliaPostFormatControlCode(AustraliaPostFormatControlCode.Standard); b.setCodeText("12345678");
getAustraliaPostFormatControlCode
in interface IBarCodeControl
public void setAustraliaPostFormatControlCode(int value)
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)
public Color getForeColor()
getForeColor
in interface IBarCodeControl
public void setForeColor(Color value)
setForeColor
in interface IBarCodeControl
public Color getBackColor()
getBackColor
in interface IBarCodeControl
public void setBackColor(Color value)
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)
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)
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)
setColumns
in interface IBarCodeControl
public int getRows()
2D BarCode's rows, if setting is illegal then rows will be calculated automatically. appliable SymbologyType: Pdf417
public void setRows(int value)
public int getDataMatrixEncodeMode()
Encode mode of Datamatrix barcode, default to Auto
public void setDataMatrixEncodeMode(int value)
public int getPdf417CompactionMode()
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>
getPdf417CompactionMode
in interface IBarCodeControl
public void setPdf417CompactionMode(int value)
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)
setPdf417Truncate
in interface IBarCodeControl
public int getPdf417ErrorLevel()
Gets or 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
getPdf417ErrorLevel
in interface IBarCodeControl
public void setPdf417ErrorLevel(int value)
setPdf417ErrorLevel
in interface IBarCodeControl
public int getMacroPdf417SegmentsCount()
Gets or sets macro pdf417 barcode segments count.
public void setMacroPdf417SegmentsCount(int value)
public int getMacroPdf417SegmentID()
Gets or sets macro pdf417 barcode's segment ID, which starts from 0, to MacroPdf417SegmentCount - 1.
public void setMacroPdf417SegmentID(int value)
public int getMacroPdf417FileID()
Gets or sets macro pdf417 barcode's file ID.
public void setMacroPdf417FileID(int value)
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)
setWideNarrowRatio
in interface IBarCodeControl
public String getSupplementData()
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
See SupplementSpace
.
[Java] com.aspose.barcode.BarCodeBuilder b; b = new BarCodeBuilder(); b.setSymbologyType(Symbology.UPCE); b.setCodeText("123456"); b.setSupplementData("11"); b.save("tmp.bmp");
getSupplementData
in interface IBarCodeControl
public void setSupplementData(String value)
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)
public int getQREncodeMode()
QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode>
public void setQREncodeMode(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)
public boolean getAlwaysShowChecksum()
Always display checksum digit in the humanreadable text for Code128 and GS1Code128 barcodes.
public void setAlwaysShowChecksum(boolean value)
public void dispose()
dispose
in interface com.aspose.ms.System.IDisposable
public BufferedImage generateBarCodeImage()
public 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 BufferedImage getOnlyBarCodeImage()
public BufferedImage getOnlyBarCodeImage(int scaleFactor)
public BufferedImage getCustomSizeBarCodeImage(Dimension customBarCodeSize, boolean allowSpaceAround)
public void save(OutputStream stream, com.aspose.ms.System.Drawing.Imaging.ImageFormat format)
save
in interface IBarCodeControl
public void save(OutputStream stream, int format)
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.ms.System.Drawing.Imaging.ImageFormat format)
Save BarCodeImage to specific file in specific format
save
in interface IBarCodeControl
filename
- save to this file pathformat
- System.Drawing.Imaging.ImageFormatpublic void save(String filename, int format)
Save BarCodeImage to specific file in specific format
filename
- save to this file pathformat
- Specifies the file format of the image.Copyright (c) 2002-2014 Aspose Pty Ltd. All Rights Reserved.