BarcodeParameters
Inheritance: java.lang.Object
public class BarcodeParameters
Barcode generation parameters.
Methods
| Method | Description |
|---|---|
| equals(Object arg0) | |
| getAspectRatio() | |
| getAustralianPost() | AustralianPost barcode parameters. |
| getAztec() | Aztec parameters. |
| getBarColor() | Bars color. |
| getBarHeight() | Height of 1D barcodes’ bars in Unit value. |
| getBarWidthReduction() | Get bars reduction value that is used to compensate ink spread while printing. |
| getBarcodeType() | |
| getChecksumAlwaysShow() | Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. |
| getClass() | |
| getCodabar() | Codabar parameters. |
| getCodablock() | Codablock parameters. |
| getCode128() | Code128 parameters. |
| getCode16K() | Code16K parameters. |
| getCodeText() | |
| getCodeTextParameters() | Codetext parameters. |
| getComplexBarcode() | |
| getCoupon() | Coupon parameters. |
| getDataBar() | Databar parameters. |
| getDataMatrix() | DataMatrix parameters. |
| getDotCode() | DotCode parameters. |
| getEnableEscape() | Indicates whether explains the character “\” as an escape character in CodeText property. |
| getFilledBars() | Gets a value indicating whether bars filled. |
| getGS1CompositeBar() | GS1 Composite Bar parameters. |
| getHanXin() | HanXin parameters. |
| getITF() | ITF parameters. |
| getMaxiCode() | MaxiCode parameters. |
| getPadding() | Barcode paddings. |
| getPatchCode() | PatchCode parameters. |
| getPdf417() | PDF417 parameters. |
| getPostal() | Postal parameters. |
| getQR() | QR, MicroQR and RectMicroQR parameters. |
| getSupplement() | Supplement parameters. |
| getThrowExceptionWhenCodeTextIncorrect() | Only for 1D barcodes. |
| getWideNarrowRatio() | Wide bars to Narrow bars ratio. |
| getXDimension() | x-dimension is the smallest width of the unit of BarCode bars or spaces. |
| hashCode() | |
| isChecksumEnabled() | |
| notify() | |
| notifyAll() | |
| setBarColor(Color value) | Bars color. |
| setBarHeight(Unit value) | Height of 1D barcodes’ bars in Unit value. |
| setBarWidthReduction(Unit value) | Sets bars reduction value that is used to compensate ink spread while printing. |
| setChecksumAlwaysShow(boolean value) | Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes. |
| setChecksumEnabled(EnableChecksum value) | |
| setCodeText(String value) | |
| setEnableEscape(boolean value) | Indicates whether explains the character “\” as an escape character in CodeText property. |
| setFilledBars(boolean value) | Sets a value indicating whether bars filled. |
| setGS1CompositeBar(GS1CompositeBarParameters value) | GS1 Composite Bar parameters. |
| setThrowExceptionWhenCodeTextIncorrect(boolean value) | Only for 1D barcodes. |
| setWideNarrowRatio(float value) | Wide bars to Narrow bars ratio. |
| setXDimension(Unit value) | x-dimension is the smallest width of the unit of BarCode bars or spaces. |
| toString() | |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getAspectRatio()
public final float getAspectRatio()
Returns: float
getAustralianPost()
public final AustralianPostParameters getAustralianPost()
AustralianPost barcode parameters.
Returns: AustralianPostParameters
getAztec()
public final AztecParameters getAztec()
Aztec parameters.
Returns: AztecParameters
getBarColor()
public final Color getBarColor()
Bars color. Default value: Color.Black.
Returns: java.awt.Color
getBarHeight()
public final Unit getBarHeight()
Height of 1D barcodes’ bars in Unit value. Ignored if BaseGenerationParameters.AutoSizeMode (BaseGenerationParameters.getAutoSizeMode/BaseGenerationParameters.setAutoSizeMode) property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.
Returns: Unit
getBarWidthReduction()
public final Unit getBarWidthReduction()
Get bars reduction value that is used to compensate ink spread while printing. Default value: 0
Returns: Unit - bars reduction value that is used to compensate ink spread while printing.
getBarcodeType()
public final BaseEncodeType getBarcodeType()
Returns: BaseEncodeType
getChecksumAlwaysShow()
public final boolean getChecksumAlwaysShow()
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
Returns: boolean
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getCodabar()
public final CodabarParameters getCodabar()
Codabar parameters.
Returns: CodabarParameters
getCodablock()
public final CodablockParameters getCodablock()
Codablock parameters.
Returns: CodablockParameters
getCode128()
public final Code128Parameters getCode128()
Code128 parameters.
Returns: Code128Parameters
getCode16K()
public final Code16KParameters getCode16K()
Code16K parameters.
Returns: Code16KParameters
getCodeText()
public final String getCodeText()
Returns: java.lang.String
getCodeTextParameters()
public final CodetextParameters getCodeTextParameters()
Codetext parameters.
Returns: CodetextParameters
getComplexBarcode()
public final ComplexBarcode getComplexBarcode()
Returns: ComplexBarcode
getCoupon()
public final CouponParameters getCoupon()
Coupon parameters. Used for UpcaGs1DatabarCoupon, UpcaGs1Code128Coupon.
Returns: CouponParameters
getDataBar()
public final DataBarParameters getDataBar()
Databar parameters.
Returns: DataBarParameters
getDataMatrix()
public final DataMatrixParameters getDataMatrix()
DataMatrix parameters.
Returns: DataMatrixParameters
getDotCode()
public final DotCodeParameters getDotCode()
DotCode parameters.
Returns: DotCodeParameters
getEnableEscape()
public final boolean getEnableEscape()
Indicates whether explains the character “\” as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, “\” will be explained as a special escape character. Otherwise, “\” acts as normal characters.
Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \\CR stands for CR.
Returns: boolean
getFilledBars()
public final boolean getFilledBars()
Gets a value indicating whether bars filled. Only for 1D barcodes. Default value: true.
Returns: boolean - a value indicating whether bars filled.
getGS1CompositeBar()
public final GS1CompositeBarParameters getGS1CompositeBar()
GS1 Composite Bar parameters.
This sample shows how to create and save a GS1 Composite Bar image. Note that 1D codetext and 2D codetext are separated by symbol ‘|’
[C#]
var codetext = "(01)03212345678906|(21)A1B2C3D4E5F6G7H8";
using (var generator = new BarcodeGenerator(EncodeTypes.GS1CompositeBar, codetext))
{
generator.Parameters.Barcode.GS1CompositeBar.LinearComponentType = EncodeTypes.GS1Code128;
generator.Parameters.Barcode.GS1CompositeBar.TwoDComponentType = TwoDComponentType.CC_A;
// Aspect ratio of 2D component
generator.Parameters.Barcode.Pdf417.AspectRatio = 3;
// X-Dimension of 1D and 2D components
generator.Parameters.Barcode.XDimension.Pixels = 3;
// Height of 1D component
generator.Parameters.Barcode.BarHeight.Pixels = 100;
generator.Save("test.png");
}
Returns: GS1CompositeBarParameters
getHanXin()
public final HanXinParameters getHanXin()
HanXin parameters.
Returns: HanXinParameters
getITF()
public final ITFParameters getITF()
ITF parameters.
Returns: ITFParameters
getMaxiCode()
public final MaxiCodeParameters getMaxiCode()
MaxiCode parameters.
Returns: MaxiCodeParameters
getPadding()
public final Padding getPadding()
Barcode paddings. Default value: 5pt 5pt 5pt 5pt.
Returns: Padding
getPatchCode()
public final PatchCodeParameters getPatchCode()
PatchCode parameters.
Returns: PatchCodeParameters
getPdf417()
public final Pdf417Parameters getPdf417()
PDF417 parameters.
Returns: Pdf417Parameters
getPostal()
public final PostalParameters getPostal()
Postal parameters. Used for Postnet, Planet.
Returns: PostalParameters
getQR()
public final QrParameters getQR()
QR, MicroQR and RectMicroQR parameters.
Returns: QrParameters
getSupplement()
public final SupplementParameters getSupplement()
Supplement parameters. Used for Interleaved2of5, Standard2of5, EAN13, EAN8, UPCA, UPCE, ISBN, ISSN, ISMN.
Returns: SupplementParameters
getThrowExceptionWhenCodeTextIncorrect()
public final boolean getThrowExceptionWhenCodeTextIncorrect()
Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode’s specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39FullASCII, Code93, Code16K, Code128 symbology if codetext is incorrect.
Returns: boolean
getWideNarrowRatio()
public final float getWideNarrowRatio()
Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39, Code39FullASCII
Returns: float
getXDimension()
public final Unit getXDimension()
x-dimension is the smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if BaseGenerationParameters.AutoSizeMode (BaseGenerationParameters.getAutoSizeMode/BaseGenerationParameters.setAutoSizeMode) property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.
Returns: Unit
hashCode()
public native int hashCode()
Returns: int
isChecksumEnabled()
public final EnableChecksum isChecksumEnabled()
Enable checksum during generation 1D barcodes.
Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible.
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar
Checksum always used: Rest symbology
Returns: EnableChecksum
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
setBarColor(Color value)
public final void setBarColor(Color value)
Bars color. Default value: Color.Black.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.awt.Color |
setBarHeight(Unit value)
public final void setBarHeight(Unit value)
Height of 1D barcodes’ bars in Unit value. Ignored if BaseGenerationParameters.AutoSizeMode (BaseGenerationParameters.getAutoSizeMode/BaseGenerationParameters.setAutoSizeMode) property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | Unit |
setBarWidthReduction(Unit value)
public final void setBarWidthReduction(Unit value)
Sets bars reduction value that is used to compensate ink spread while printing. Default value: 0
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | Unit | bars reduction value that is used to compensate ink spread while printing. |
setChecksumAlwaysShow(boolean value)
public final void setChecksumAlwaysShow(boolean value)
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
setChecksumEnabled(EnableChecksum value)
public final void setChecksumEnabled(EnableChecksum value)
Enable checksum during generation 1D barcodes.
Default is treated as Yes for symbology which must contain checksum, as No where checksum only possible.
Checksum is possible: Code39 Standard/Extended, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, DeutschePostIdentcode, DeutschePostLeitcode, VIN, Codabar
Checksum always used: Rest symbology
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | EnableChecksum |
setCodeText(String value)
public final void setCodeText(String value)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | java.lang.String |
setEnableEscape(boolean value)
public final void setEnableEscape(boolean value)
Indicates whether explains the character “\” as an escape character in CodeText property. Used for Pdf417, DataMatrix, Code128 only If the EnableEscape is true, “\” will be explained as a special escape character. Otherwise, “\” acts as normal characters.
Aspose.BarCode supports inputing decimal ascii code and mnemonic for ASCII control-code characters. For example, \013 and \\CR stands for CR.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
setFilledBars(boolean value)
public final void setFilledBars(boolean value)
Sets a value indicating whether bars filled. Only for 1D barcodes. Default value: true.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | a value indicating whether bars filled. |
setGS1CompositeBar(GS1CompositeBarParameters value)
public final void setGS1CompositeBar(GS1CompositeBarParameters value)
GS1 Composite Bar parameters.
This sample shows how to create and save a GS1 Composite Bar image. Note that 1D codetext and 2D codetext are separated by symbol ‘|’
[C#]
var codetext = "(01)03212345678906|(21)A1B2C3D4E5F6G7H8";
using (var generator = new BarcodeGenerator(EncodeTypes.GS1CompositeBar, codetext))
{
generator.Parameters.Barcode.GS1CompositeBar.LinearComponentType = EncodeTypes.GS1Code128;
generator.Parameters.Barcode.GS1CompositeBar.TwoDComponentType = TwoDComponentType.CC_A;
// Aspect ratio of 2D component
generator.Parameters.Barcode.Pdf417.AspectRatio = 3;
// X-Dimension of 1D and 2D components
generator.Parameters.Barcode.XDimension.Pixels = 3;
// Height of 1D component
generator.Parameters.Barcode.BarHeight.Pixels = 100;
generator.Save("test.png");
}
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | GS1CompositeBarParameters |
setThrowExceptionWhenCodeTextIncorrect(boolean value)
public final void setThrowExceptionWhenCodeTextIncorrect(boolean value)
Only for 1D barcodes. If codetext is incorrect and value set to true - exception will be thrown. Otherwise codetext will be corrected to match barcode’s specification. Exception always will be thrown for: Databar symbology if codetext is incorrect. Exception always will not be thrown for: AustraliaPost, SingapurePost, Code39FullASCII, Code93, Code16K, Code128 symbology if codetext is incorrect.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
setWideNarrowRatio(float value)
public final void setWideNarrowRatio(float value)
Wide bars to Narrow bars ratio. Default value: 3, that is, wide bars are 3 times as wide as narrow bars. Used for ITF, PZN, PharmaCode, Standard2of5, Interleaved2of5, Matrix2of5, ItalianPost25, IATA2of5, VIN, DeutschePost, OPC, Code32, DataLogic2of5, PatchCode, Code39, Code39FullASCII
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | float |
setXDimension(Unit value)
public final void setXDimension(Unit value)
x-dimension is the smallest width of the unit of BarCode bars or spaces. Increase this will increase the whole barcode image width. Ignored if BaseGenerationParameters.AutoSizeMode (BaseGenerationParameters.getAutoSizeMode/BaseGenerationParameters.setAutoSizeMode) property is set to AutoSizeMode.Nearest or AutoSizeMode.Interpolation.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | Unit |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| arg0 | long | |
| arg1 | int |