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.
|
int |
getEnable() |
void |
setAlwaysShow(boolean value)
Always display checksum digit in the human readable text for Code128 and GS1Code128 barcodes.
|
void |
setEnable(int value) |
public int 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(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");