Class EscPosBarcode

  • All Implemented Interfaces:
    EscPosPrintObject

    public class EscPosBarcode
    extends java.lang.Object
    implements EscPosPrintObject
    Printable ESC/POS bar code representation.
    Since:
    TotalCross 4.2.0
    • Field Detail

      • TEXTPRINTINGPOSITION_NONE

        public static final byte TEXTPRINTINGPOSITION_NONE
        See Also:
        Constant Field Values
      • TEXTPRINTINGPOSITION_ABOVE

        public static final byte TEXTPRINTINGPOSITION_ABOVE
        See Also:
        Constant Field Values
      • TEXTPRINTINGPOSITION_BELOW

        public static final byte TEXTPRINTINGPOSITION_BELOW
        See Also:
        Constant Field Values
      • TEXTPRINTINGPOSITION_BOTH

        public static final byte TEXTPRINTINGPOSITION_BOTH
        See Also:
        Constant Field Values
    • Method Detail

      • textPrintingPosition

        public EscPosBarcode textPrintingPosition​(byte textPrintingPosition)
        Selects the print position of Human Readable Interpretation (HRI) characters when printing a bar code.
        Parameters:
        textPrintingPosition -
        Returns:
      • height

        public EscPosBarcode height​(int n)
        Sets the bar code height to n dots.

        The original ESC/POS Manual defines the bar code height in dots, but the actual size of a dot and the default value for n and may differ for each device.

        For instance, the default bar code height for devices with dot size of 0.125mm (1/203 inches) is 162.

        Known default values:

      • Datecs DPP-350: 162
      • Leopardo A7: 36
Parameters:
n -
Returns:
Parameters:
n -
Returns: