Class Barcode93


  • public class Barcode93
    extends Barcode
    Implements the code 93. The default parameters are:
     x = 1f;
     n = 2;
     font = new Font("Helvetica",Font.PLAIN,20));
     textAlignment = ALIGN_CENTER;
     generateChecksum = false;
     checksumText = false;
     startStopText = true;
     extended = false;
     codeType = CODE93;
     transparent = true;
     shotText = true
     generateChecksum = true;
     checksumText = false;
     
    This class is based on iText "A Free Java-PDF library by Bruno Lowagie and Paulo Soares" using the Mozilla Public License(MPL)
    • Field Detail

      • CHARS

        public static java.lang.String CHARS
        Code 93 chars ordered by code93 value
      • ASCII_CHARS

        public static java.lang.String ASCII_CHARS
        ASCII chars representation in Code 93 using escape chars. First digit is escape char using this convention: escape ' ' = No escape char escape '*' = First Escape char; Barcode93 value 43 escape '&' = Second Escape char; Barcode93 value 44 escape '#' = Thirth Escape char; Barcode93 value 45 escape '@' = Fourth Escape char; Barcode93 value 46 The second digit is the code 93 char to use
    • Constructor Detail

      • Barcode93

        public Barcode93()
        Creates a new Barcode39.
    • Method Detail

      • getBarcodeWidth

        public int getBarcodeWidth()
        Gets the maximum width that the barcode will occupy. The lower left corner is always (0, 0).
        Specified by:
        getBarcodeWidth in class Barcode
        Returns:
        the size the barcode occupies.
      • getChecksum

        public static java.lang.String getChecksum​(java.lang.String text)
        Calculates the checksum.
        Parameters:
        text - the text
        Returns:
        the checksum
      • placeBarcode

        public void placeBarcode​(Image i,
                                 int barColor,
                                 int textColor)
        Places the barcode in a Image. The The bars and text are written in the following colors:

        barColor

        textColor

        Result

        null

        null

        bars and text painted with current fill color

        barColor

        null

        bars and text painted with barColor

        null

        textColor

        bars painted with current color
        text painted with textColor

        barColor

        textColor

        bars painted with barColor
        text painted with textColor

        Specified by:
        placeBarcode in class Barcode
        Parameters:
        i - the Image where the barcode will be placed
        barColor - the color of the bars. It can be -1
        textColor - the color of the text. It can be -1