public final class ChecksumProperties
extends java.lang.Object
Contains specific configuration properties for checksum of barcode.
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_39_STANDARD,"12345"); generator.getChecksum().setEnable(EnableChecksum.YES); generator.save("test.png");
Constructor and Description |
---|
ChecksumProperties() |
Modifier and Type | Method and Description |
---|---|
boolean |
getAlwaysShow()
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
|
EnableChecksum |
getEnable() |
void |
setAlwaysShow(boolean value)
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
|
void |
setEnable(EnableChecksum value) |
void |
setEnable(int value)
Deprecated.
|
java.lang.String |
toString()
eturns a human-readable string representation of this ChecksumProperties
|
public EnableChecksum getEnable()
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
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_39_STANDARD,"12345"); generator.getChecksum().setEnable(EnableChecksum.YES); int enabled = generator.getChecksum().getEnable(); generator.save("test.png");
public void setEnable(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
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_39_STANDARD,"12345"); generator.getChecksum().setEnable(EnableChecksum.YES); generator.save("test.png");
@Deprecated public void setEnable(int 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
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_39_STANDARD,"12345"); generator.getChecksum().setEnable(EnableChecksum.YES); generator.save("test.png");
public boolean getAlwaysShow()
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_128,"12345"); generator.getChecksum().setAlwaysShow(true); boolean alwaysShow = generator.getChecksum().getAlwaysShow(); generator.save("test.png");
public void setAlwaysShow(boolean value)
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
This sample shows how to create and save a BarCode image.BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.CODE_128,"12345"); generator.getChecksum().setAlwaysShow(true); generator.save("test.png");
public java.lang.String toString()
toString
in class java.lang.Object