public class BarCodeBuilder extends Object
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 codeConstructor 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(boolean disposing)
Clean up any resources being used.
|
BufferedImage |
generateBarCodeImage()
Deprecated.
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()
Wether ajust 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 . |
com.aspose.ms.System.Drawing.Bitmap |
getBarCodeImage()
Get the BarCode image under current settings
|
Caption |
getBarCodeImageCaptionAbove() |
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()
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 |
getCode128CodeSet()
Code128 symbology type of barcode's code set, default to Code128CodeSet.Auto"
|
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()
Sets 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 |
getDataMatrixEncodeMode()
Encode mode of Datamatrix barcode, default to Auto
|
String |
getDisplay2DText()
Gets the text will displayed on the barcode's image.
|
int |
getEnableChecksum() |
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 |
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
<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 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 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: com.aspose.barcode.SymbologyType.
|
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.
|
void |
insertWatermark() |
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)
Deprecated.
Save BarCodeImage to specific file in specific format |
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.ms.System.Drawing.Imaging.ImageFormat format)
Deprecated.
Save BarCodeImage to specific file in specific format |
void |
save(String filename,
int format)
Save BarCodeImage to specific file in specific format
|
void |
saveAsEmf(OutputStream 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)
Wether ajust 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)
Gets 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 |
setCode128CodeSet(int value)
Code128 symbology type of barcode's code set, default to Code128CodeSet.Auto"
|
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 |
setCodeTextEncodingInternal(com.aspose.ms.System.Text.Encoding value)
Deprecated.
|
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 |
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 |
setEnableChecksum(int value) |
void |
setEnableEscape(boolean value)
Indicates whether explains the character "\" as an escape character in CodeText property.
|
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 |
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
<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)
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
<bode>Auto</bode> |
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)
2D 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.SymbologyType.
|
void |
setTextRenderingHint(int value)
Specifies the quality of text rendering.
|
void |
setWideNarrowRatio(float value) |
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: com.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 Caption getBarCodeImageCaptionAbove()
public long getSymbologyType()
BarCode's symbology, type: com.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
public void setSymbologyType(long value)
BarCode's symbology, type: com.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
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
.
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
.
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.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.public Charset getCodeTextEncoding()
Sets the encoding of codetext.
Value: The encoding for codetext.public void setCodeTextEncodingInternal(com.aspose.ms.System.Text.Encoding value)
public void setCodeTextEncoding(Charset value)
Sets the encoding of codetext.
Value: The encoding for codetext.public void setEnableEscape(boolean value)
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>
public Font getCodeTextFont()
Specify the displaying CodeText's font
See CodeText
.
See System.Drawing.Font
.
See CodeTextColor
.
See CodeLocation
.
See CodeTextSpace
.
See CodeTextAlignment
.
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
.
public Color getCodeTextColor()
Specify the displaying CodeText's Color
See System.Drawing.Color
.
See CodeText
.
See CodeTextFont
.
See CodeLocation
.
See CodeTextSpace
.
See CodeTextAlignment
.
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
.
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
.
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
.
public int getCodeTextAlignment()
Gets the alignment of the code text.
See System.Drawing.StringAlignment
.
See CodeText
.
See CodeTextFont
.
See CodeTextColor
.
See CodeTextSpace
.
public void setCodeTextAlignment(int value)
Sets the alignment of the code text.
See System.Drawing.StringAlignment
.
See CodeText
.
See CodeTextFont
.
See CodeTextColor
.
See CodeTextSpace
.
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
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
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
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
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
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
public int getGraphicsUnit()
Measurement of various properties such as Width, Height etc.
Default GraphicsUnit: Millimeter
See com.aspose.barcode.GraphicsUnit
.
public void setGraphicsUnit(int value)
Measurement of various properties such as Width, Height etc.
Default GraphicsUnit: Millimeter
See com.aspose.barcode.GraphicsUnit
.
public Resolution getResolution()
Gets the resolution of the BarCode image
See Resolution
.
public void setResolution(Resolution value)
Sets the resolution of the BarCode image
See Resolution
.
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: com.aspose.barcode.ImageQualityMode
See ImageQualityMode
.
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: com.aspose.barcode.ImageQualityMode
See ImageQualityMode
.
public int getTextRenderingHint()
Specifies the quality of text rendering.
public void setTextRenderingHint(int value)
Specifies the quality of text rendering.
public boolean getAutoSize()
Wether ajust image's size automatically. Recommended: true
public void setAutoSize(boolean value)
Wether ajust image's size automatically. Recommended: true
public float getImageWidth()
BarCode image's width See AutoSize
., if AutoSize is true, ImageWidth will
be increased accordingly
Default Graphics Unit: Millimeter
public void setImageWidth(float value)
BarCode image's width See AutoSize
., if AutoSize is true, ImageWidth will
be increased accordingly
Default Graphics Unit: Millimeter
public float getImageHeight()
BarCode image's height See AutoSize
., if AutoSize is true, ImageHeight will
be increased accordingly
Default Graphics Unit: Millimeter
public void setImageHeight(float value)
BarCode image's height See AutoSize
., if AutoSize is true, ImageHeight will
be increased accordingly
Default Graphics Unit: Millimeter
public float getBorderWidth()
BarCode Image's border's width
Default Graphics Unit: Millimeter
See BorderVisible
.
See BorderDashStyle
.
See BorderColor
.
public void setBorderWidth(float value)
BarCode Image's border's width
Default Graphics Unit: Millimeter
See BorderVisible
.
See BorderDashStyle
.
See BorderColor
.
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
.
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
.
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
.
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
.
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
.
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
.
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
.
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
.
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
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
.
public void setSupplementSpace(float value)
Space between main the BarCode and supplement BarCode, default Graphics Unit: millimeter
See System.Drawing.GraphicsUnit
.
See SupplementData
.
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 com.aspose.barcode.GraphicsUnit
.
see setting tall bar's height: See BarHeightBarHeight
.
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 com.aspose.barcode.GraphicsUnit
.
see setting tall bar's height: See BarHeightBarHeight
.
public float getPlanetShortBarHeight()
Short bar's height of Planet barcode, it has to be between 1 millimeter and 1.5 milimeters.
see changing See com.aspose.barcode.GraphicsUnit
.
see setting tall bar's height: See BarHeightBarHeight
.
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 com.aspose.barcode.GraphicsUnit
.
see setting tall bar's height: See BarHeightBarHeight
.
public float getCodeTextSpace()
Space between the CodeText and the BarCode.
Default Graphics Unit: Millimeter
See CodeText
.
See CodeLocation
.
See CodeTextFont
.
See CodeTextColor
.
See CodeTextAlignment
.
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
.
public com.aspose.ms.System.Drawing.Bitmap getBarCodeImage()
Get the BarCode image under current settings
public void setBorderVisible(boolean value)
Gets a value indicating whether [border visible].
Value:true
if [border visible]; otherwise, false
.public boolean getBorderVisible()
Sets a value indicating whether [border visible].
Value:true
if [border visible]; otherwise, false
.public Color getBorderColor()
BarCode Image's border's color
See BorderWidth
.
See BorderVisible
.
See BorderDashStyle
public void setBorderColor(Color value)
BarCode Image's border's color
See BorderWidth
.
See BorderVisible
.
See BorderDashStyle
public int getBorderDashStyle()
BarCode Image's border's style
See BorderWidth
.
See BorderVisible
.
See BorderColor
public void setBorderDashStyle(int value)
BarCode Image's border's style
See BorderWidth
.
See BorderVisible
.
See BorderColor
public short getCodabarStartSymbol()
Start symbol (character) of codabar symbology
See CodabarStopSymbol
.
public void setCodabarStartSymbol(short value)
Start symbol (character) of codabar symbology
See CodabarStopSymbol
.
public short getCodabarStopSymbol()
Stop symbol (character) of codabar symbology
See CodabarStartSymbol
.
public void setCodabarStopSymbol(short value)
Stop symbol (character) of codabar symbology
See CodabarStartSymbol
.
public int getCode128CodeSet()
Code128 symbology type of barcode's code set, default to Code128CodeSet.Auto"
public void setCode128CodeSet(int value)
Code128 symbology type of barcode's code set, default to Code128CodeSet.Auto"
public int getAustraliaPostFormatControlCode()
Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"
public void setAustraliaPostFormatControlCode(int value)
Australia Post symbology type of barcode's FormatControlCode, default to AustraliaPostFormatControlCode.Standard"
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 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
.
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
.
public Color getBackColor()
Background color of the barcode image
See System.Drawing.Color
.
public void setBackColor(Color value)
Background color of the barcode image
See System.Drawing.Color
.
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
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
public int getColumns()
2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417
public void setColumns(int value)
2D BarCode's columns, if setting is illegal then columns will be calculated automatically appliable SymbologyType: Pdf417
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)
2D BarCode's rows, if setting is illegal then rows will be calculated automatically. appliable SymbologyType: Pdf417
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 <bode>Auto</bode>
public void setPdf417CompactionMode(int value)
Pdf417 symbology type of BarCode's compaction mode, default compaction mode is <bode>Auto</bode>
public boolean getPdf417Truncate()
whether pdf417 symbology type of BarCode is truncated (to reduce space)
public void setPdf417Truncate(boolean value)
whether pdf417 symbology type of BarCode is truncated (to reduce space)
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
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
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
public void setWideNarrowRatio(float value)
public String getSupplementData()
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
See SupplementSpace
.
public void setSupplementData(String value)
Supplement data following BarCodes of symbology UPCA, UPCE, EAN13, EAN8, ISBN, Interleaved2of5 or Standard2of5.
See SupplementSpace
.
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 <bode>Auto</bode>
public void setQREncodeMode(int value)
QR symbology type of BarCode's encoding mode, default mode is <bode>Auto</bode>
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 void insertWatermark()
public void dispose(boolean disposing)
Clean up any resources being used.
disposing
- true to release both managed and unmanaged resources; false to release only unmanaged resources.public BufferedImage generateBarCodeImage()
Generate the BarCode image under current settings
System.Drawing.Bitmap
.public void saveAsEmf(String fileName)
Save the BarCode as Emf file using given file name.
public void saveAsEmf(OutputStream stream)
Save the BarCode as Emf to stream.
stream
- System.IO.Streampublic void rotate()
Rotate barcode image clockwise for 90 degrees
public void rotate(float angle)
Rotate barcode image clockwise
angle
- Rotation Anglepublic void rotate(int direction, float angle)
Rotate the barcode image
direction
- rotation directionangle
- rotation anglepublic 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)
Save BarCodeImage to stream in specific format
public void save(OutputStream stream, com.aspose.ms.System.Drawing.Imaging.ImageFormat format)
Save BarCodeImage to specific file in specific format
stream
- System.IO.Streamformat
- System.Drawing.Imaging.ImageFormatpublic void save(String filename)
Save BarCodeImage to specific file in specific format
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
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.