ESCUtil

simpos · pos

ESC/POS command constants and builder functions for thermal receipt printers. Covers alignment, bold, underline, bitmap printing, line spacing, and character encoding.

// Source: https://github.com/hieuhani/simpos | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
package com.onereva.simpos.util

import android.graphics.Bitmap

//常用指令封装
object ESCUtil {
    const val ESC: Byte = 0x1B // Escape
    const val FS: Byte = 0x1C // Text delimiter
    const val GS: Byte = 0x1D // Group separator
    const val DLE: Byte = 0x10 // data link escape
    const val EOT: Byte = 0x04 // End of transmission
    const val ENQ: Byte = 0x05 // Enquiry character
    const val SP: Byte = 0x20 // Spaces
    const val HT: Byte = 0x09 // Horizontal list
    const val LF: Byte = 0x0A //Print and wrap (horizontal orientation)
    const val CR: Byte = 0x0D // Home key
    const val FF: Byte =
        0x0C // Carriage control (print and return to the st

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key