com.aspose.barcode.generation

Class CodabarProperties

  • java.lang.Object
    • com.aspose.barcode.generation.CodabarProperties


  • public final class CodabarProperties
    extends java.lang.Object

    Contains specific configuration properties for Codabar barcode.


      This sample shows how to create and save a BarCode image.
      
             BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODABAR);
             generator.setCodeText("123456789");
             generator.getChecksum().setEnable(EnableChecksum.Yes);
             generator.getCodabar().setChecksumMode(CodabarChecksumMode.Mod10);
             generator.save("test.png");
            

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      CodabarChecksumMode getChecksumMode()
      Get or set the checksum algorithm for Codabar barcodes.
      short getStartSymbol()
      Start symbol (character) of Codabar symbology.
      short getStopSymbol()
      Stop symbol (character) of Codabar symbology.
      void setChecksumMode(CodabarChecksumMode value)
      Get or set the checksum algorithm for Codabar barcodes.
      void setChecksumMode(int value)
      Get or set the checksum algorithm for Codabar barcodes.
      void setStartSymbol(short value)
      Start symbol (character) of Codabar symbology.
      void setStopSymbol(short value)
      Stop symbol (character) of Codabar symbology.
      java.lang.String toString()
      Returns a human-readable string representation of this CodabarProperties
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CodabarProperties

        public CodabarProperties()
    • Method Detail

      • getChecksumMode

        public CodabarChecksumMode getChecksumMode()

        Get or set the checksum algorithm for Codabar barcodes. Default value is CodabarChecksum.Mod16. To enable checksum calculation set value EnableChecksum.Yes to property EnableChecksum. See CodabarChecksumMode.


          This sample shows how to change Codabar checksum algorithm and save a BarCode image.
          
                 BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODABAR);
                 generator.setCodeText("123456789");
                 generator.getChecksum().setEnable(EnableChecksum.Yes);
                 generator.getCodabar().setChecksumMode(CodabarChecksumMode.Mod10);
                 generator.save("test.png");
                

      • setChecksumMode

        public void setChecksumMode(CodabarChecksumMode value)

        Get or set the checksum algorithm for Codabar barcodes. Default value is CodabarChecksum.Mod16. To enable checksum calculation set value EnableChecksum.Yes to property EnableChecksum. See CodabarChecksumMode.


          This sample shows how to change Codabar checksum algorithm and save a BarCode image.
          
                 BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODABAR);
                 generator.setCodeText("123456789");
                 generator.getChecksum().setEnable(EnableChecksum.Yes);
                 generator.getCodabar().setChecksumMode(CodabarChecksumMode.Mod10);
                 generator.save("test.png");
                

      • setChecksumMode

        public void setChecksumMode(int value)

        Get or set the checksum algorithm for Codabar barcodes. Default value is CodabarChecksum.Mod16. To enable checksum calculation set value EnableChecksum.Yes to property EnableChecksum. See CodabarChecksumMode.


          This sample shows how to change Codabar checksum algorithm and save a BarCode image.
          
                 BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODABAR);
                 generator.setCodeText("123456789");
                 generator.getChecksum().setEnable(EnableChecksum.Yes);
                 generator.getCodabar().setChecksumMode(CodabarChecksumMode.Mod10);
                 generator.save("test.png");
                

      • getStartSymbol

        public short getStartSymbol()

        Start symbol (character) of Codabar symbology. See StopSymbol.


          This sample shows how to set start and stop Codabar symbol and save a BarCode image.
          
          BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODABAR);
          generator.getCodabar().setStartSymbol(CodabarSymbol.B);
          generator.getCodabar().setStopSymbol(CodabarSymbol.D);
          generator.save("test.png");
                

      • setStartSymbol

        public void setStartSymbol(short value)

        Start symbol (character) of Codabar symbology. See StopSymbol.


          This sample shows how to set start and stop Codabar symbol and save a BarCode image.
          
          BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODABAR);
          generator.getCodabar().setStartSymbol(CodabarSymbol.B);
          generator.getCodabar().setStopSymbol(CodabarSymbol.D);
          generator.save("test.png");
                

      • getStopSymbol

        public short getStopSymbol()

        Stop symbol (character) of Codabar symbology. See StartSymbol.


          This sample shows how to set start and stop Codabar symbol and save a BarCode image.
          
          BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODABAR);
          generator.getCodabar().setStartSymbol(CodabarSymbol.B);
          generator.getCodabar().setStopSymbol(CodabarSymbol.D);
          generator.save("test.png");
                

      • setStopSymbol

        public void setStopSymbol(short value)

        Stop symbol (character) of Codabar symbology. See StartSymbol.


          This sample shows how to set start and stop Codabar symbol and save a BarCode image.
          
          BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODABAR);
          generator.getCodabar().setStartSymbol(CodabarSymbol.B);
          generator.getCodabar().setStopSymbol(CodabarSymbol.D);
          generator.save("test.png");
                

      • toString

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