com.aspose.barcode.generation.internal

Class ChecksumProperties

  • java.lang.Object
    • com.aspose.barcode.generation.internal.ChecksumProperties


  • 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 Detail

      • ChecksumProperties

        public ChecksumProperties()
    • Method Detail

      • getEnable

        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");
                
      • setEnable

        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");
                
      • setEnable

        @Deprecated
        public void setEnable(int value)
        Deprecated. 

        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");
                
      • getAlwaysShow

        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");
                
      • setAlwaysShow

        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");
                
      • toString

        public java.lang.String toString()
        eturns a human-readable string representation of this ChecksumProperties
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string that represents this ChecksumProperties