/** * ESC/Bematech Command Set * * Command bytes for Bematech MP-4200 TH thermal printer using ESC/Bematech protocol. * Reference: Bematech MP-4200 TH Programmer's Manual - Revision 1.0, Chapter 3 * * This file contains all documented ESC/Bematech commands organized by category. * Commands follow the Bematech-specific implementation which differs from standard ESC/POS. */ export declare const NUL = 0; export declare const SOH = 1; export declare const STX = 2; export declare const ETX = 3; export declare const EOT = 4; export declare const ENQ = 5; export declare const ACK = 6; export declare const BEL = 7; export declare const BS = 8; export declare const HT = 9; export declare const LF = 10; export declare const FF = 12; export declare const CR = 13; export declare const SO = 14; export declare const SI = 15; export declare const DC2 = 18; export declare const DC4 = 20; export declare const NAK = 21; export declare const SYN = 22; export declare const ETB = 23; export declare const CAN = 24; export declare const ESC = 27; export declare const FS = 28; export declare const GS = 29; export declare const DEL = 127; /** * ESC @ - Initialize printer to default settings * Hexadecimal: 1B 40 * Decimal: 27 64 * * Cancels all printer settings including character font, line spacing, * margins, and returns printer to initial state. */ export declare const INIT: number[]; /** * GS F9h 5 n - Select printer operating mode (permanent) * Saves to non-volatile memory * n = 0 or 48: ESC/Bema mode * n = 1 or 49: ESC/POS mode */ export declare const selectESCBemaMode: () => number[]; export declare const selectESCPOSMode: () => number[]; /** * GS F9h SP n - Select printer operating mode temporarily * Does NOT save to memory * n = 0 or 48: ESC/Bema mode * n = 1 or 49: ESC/POS mode */ export declare const selectESCBemaModeTemp: () => number[]; export declare const selectESCPOSModeTemp: () => number[]; /** * GS F9h 1Fh 1 - Return to previously set mode * Hexadecimal: 1D F9 1F 31 */ export declare const returnToPreviousMode: () => number[]; /** * GS F9h C 00h - Get printer current command set * Returns: 0 = ESC/Bema, 1 = ESC/POS */ export declare const GET_CURRENT_MODE: number[]; /** * Code page identifiers */ export declare enum CodePage { CP850 = 2,// CODEPAGE 850 (default) CP437 = 3,// CODEPAGE 437 CP860 = 4,// CODEPAGE 860 (Portuguese) CP858 = 5,// CODEPAGE 858 CP866 = 6,// CODEPAGE 866 CP864 = 7,// CODEPAGE 864 UTF8 = 8,// UTF8 (Unicode) BIG5E = 9,// Big-5E JIS = 10,// JIS (0Ah) SHIFT_JIS = 11,// SHIFT JIS (0Bh) GB2312 = 12,// GB2312 (0Ch) EUC_CN = 14,// EUC-CN (0Eh) CP862 = 21 } /** * ESC t n - Select code page * Hexadecimal: 1B 74 n * Default: CP850 */ export declare const setCodePage: (codePage: CodePage) => number[]; /** * GS F9h 7 n - Set and save printer default code page * Saves to non-volatile memory */ export declare const setDefaultCodePage: (codePage: CodePage) => number[]; /** * GS F9h 8 n - Set and save ESC/POS ideogram mode * n = 0: UTF8 (Unicode) * n = 1: ESC/POS Japanese * n = 2: ESC/POS Simplified Chinese * n = 3: ESC/POS Traditional Chinese */ export declare const setIdeogramMode: (mode: 0 | 1 | 2 | 3) => number[]; /** * ESC R n - Select international character set * n = 0: CODEPAGE 437 * n = 1-11: CODEPAGE 858 * n = 12: CODEPAGE 850 (default) */ export declare const setInternationalCharset: (n: number) => number[]; /** * ESC Z - Print supported Unicode sets * Prints a chart showing all supported Unicode character sets */ export declare const PRINT_UNICODE_SETS: number[]; /** * ESC [ n - Print specific Unicode set * Range: 0 ≤ n ≤ 255 */ export declare const printUnicodeSet: (n: number) => number[]; /** * Paper width presets (ESC/Bema mode only) * Format: [paper width in mm, printing width in mm] */ export declare enum PaperWidth { WIDTH_58_48 = 0,// 58mm paper, 48mm print width WIDTH_76_72 = 1,// 76mm paper, 72mm print width WIDTH_80_72 = 2,// 80mm paper, 72mm print width WIDTH_80_76 = 3,// 80mm paper, 76mm print width (default) WIDTH_82_72 = 4,// 82.5mm paper, 72mm print width WIDTH_82_76 = 5,// 82.5mm paper, 76mm print width WIDTH_82_80 = 6 } /** * GS F9h ! n - Set and save paper width * Only effective in ESC/Bema mode * In ESC/POS mode, paper width is always 80mm/73.5mm */ export declare const setPaperWidth: (width: PaperWidth) => number[]; /** * GS F9h , n - Enable/disable paper near-end sensor (PNES) * n = 0 or 48: Disable PNES * n = 1 or 49: Enable PNES (default) * Saves to non-volatile memory */ export declare const enablePaperNearEndSensor: () => number[]; export declare const disablePaperNearEndSensor: () => number[]; /** * ESC b n - Select paper sensor to output paper-end signal * n = 0 or 48: PE reflects paper sensor (default) * n = 1 or 49: PE reflects drawer sensor */ export declare const selectPaperSensor: () => number[]; export declare const selectDrawerSensor: () => number[]; /** * Printer quality modes */ export declare enum PrinterMode { NORMAL = 0,// Normal mode (default) HIGH_QUALITY = 1,// High quality mode HIGH_SPEED = 2 } /** * GS F9h - n - Set and save printer mode * Sets printing priority to high quality or high speed */ export declare const setPrinterMode: (mode: PrinterMode) => number[]; /** * ESC N n - Select printing intensity (OBSOLETE) * Kept for compatibility with earlier Bematech products * Command is ignored by MP-4200 TH */ export declare const setPrintingIntensity: (n: number) => number[]; /** * GS F9h + n - Set and save printing intensity (OBSOLETE) * Kept for compatibility with earlier Bematech products * Command is ignored by MP-4200 TH */ export declare const setPrintingIntensityAlt: (n: number) => number[]; /** * GS FAh n - Set and save printer language * n = 0 or 48: English * n = 1 or 49: Portuguese * n = 2 or 50: Spanish * n = 3 or 51: German */ export declare enum PrinterLanguage { ENGLISH = 0, PORTUGUESE = 1, SPANISH = 2, GERMAN = 3 } export declare const setPrinterLanguage: (lang: PrinterLanguage) => number[]; /** * GS F9h ' n - Get printer information * Returns different information based on n value: * n = 0 or 48: Product code (10 bytes) * n = 1 or 49: Serial number (20 bytes) * n = 2 or 50: Manufacturing date (4 bytes) * n = 3 or 51: Firmware version (3 bytes) * n = 5 or 53: Manufacturing timestamp (17 bytes, "dd/mm/yy hh:mm:ss") * n = 8 or 56: Interface type (1 byte: 0=None, 1=Serial DB-9, 2=Serial DB-25, 3=Ethernet, -1=Unknown) */ export declare const getPrinterInfo: (infoType: 0 | 1 | 2 | 3 | 5 | 8) => number[]; /** * GS F9h ( 0 - Load default user configuration * Reloads all configurations from non-volatile memory and dipswitches */ export declare const LOAD_DEFAULT_CONFIG: number[]; /** * GS F9h ) 0 - Print user configuration * Prints current user configuration on paper */ export declare const PRINT_CONFIG: number[]; /** * GS F8h F - Printer reset * Forces a hardware reset */ export declare const RESET_PRINTER: number[]; /** * ESC y n - Enable/disable panel keys * n = 0 or 48: Disable panel keys * n = 1 or 49: Enable panel keys (default) */ export declare const enablePanelKeys: () => number[]; export declare const disablePanelKeys: () => number[]; /** * ESC x - Enable dump mode * Prints data in hexadecimal for debugging * WARNING: Only way to exit dump mode is to turn off printer */ export declare const ENABLE_DUMP_MODE: number[]; /** * ESC v n - Activate drawer #1 for n milliseconds * Range: 50 ≤ n ≤ 250 (actual: 50ms ≤ n ≤ 200ms) */ export declare const activateDrawer1: (milliseconds: number) => number[]; /** * ESC 80h n - Activate drawer #2 for n milliseconds * Range: 50 ≤ n ≤ 250 (actual: 50ms ≤ n ≤ 200ms) */ export declare const activateDrawer2: (milliseconds: number) => number[]; /** * ESC i - Perform full paper cut * Hexadecimal: 1B 69 */ export declare const CUT_FULL: number[]; /** * ESC w - Perform full paper cut (alternate command) * Hexadecimal: 1B 77 */ export declare const CUT_FULL_ALT: number[]; /** * GS F9h D m n - Activate buzzer on cut * m: Buzzer selection (0=none, 1=internal, 2=external) * n: Activation time (n × 100ms) * Default: m=0, n=200 */ export declare const setBuzzerOnCut: (buzzer: 0 | 1 | 2, time: number) => number[]; export declare const disableBuzzerOnCut: () => number[]; /** * ESC ( A pL pH fn n1 n2 vol - Activate/deactivate buzzer * pL + pH × 256 = 4 (always: pL=4, pH=0) * fn = 1 or 49: Activate buzzer * fn = 0 or 48: Deactivate buzzer (deprecated) * n = (n1 + n2 × 256): Time in milliseconds * vol = 0, 1, 48, or 49: Volume (unused) */ export declare const activateBuzzer: (milliseconds: number) => number[]; /** * LF - Feed one line * Prints buffer contents and feeds one line according to default line spacing */ export declare const FEED_LINE: number[]; /** * FF - Feed one page * Moves from current position to top of next page * Can be disabled by setting page size to zero */ export declare const FEED_PAGE: number[]; /** * ESC J n - Perform fine line feed * Range: 48 ≤ n ≤ 255 * Feed: (n - 48) × 0.125mm * Widely used for graphics printing */ export declare const fineFeed: (n: number) => number[]; /** * ESC A n - Feed paper by [n × 0.375]mm * Range: 0 ≤ n ≤ 255 * Notes: n < 17 → 0mm, n > 85 → 32mm, else n × 0.375mm */ export declare const feedPaper: (n: number) => number[]; /** * ESC 2 - Set text line height to 1/6 inches (default) * Hexadecimal: 1B 32 */ export declare const SET_LINE_HEIGHT_DEFAULT: number[]; /** * ESC 3 n - Set line feed to n/144 inches * Range: 18 ≤ n ≤ 255 * Takes effect immediately */ export declare const setLineSpacing: (n: number) => number[]; /** * ESC f 1 n - Vertical skipping * Range: 0 ≤ n ≤ 255 * Performs vertical skipping of n characters * Alternate: 1B 66 01 n (same effect) */ export declare const verticalSkip: (n: number) => number[]; /** * ESC f 0 n - Horizontal skipping * Range: 0 ≤ n ≤ 255 * Performs horizontal skipping of n characters * Alternate: 1B 66 00 n (same effect) */ export declare const horizontalSkip: (n: number) => number[]; /** * ESC C n - Set page size in lines * Range: 0 < n < 256 * Default: n = 12 * n represents number of single-height lines */ export declare const setPageSizeLines: (lines: number) => number[]; /** * ESC c n1 n2 - Set page size in millimeters * Range: 0 ≤ n1 ≤ 255, 0 ≤ n2 ≤ 255 * Page size = 0.125mm × [n1 + (256 × n2)] */ export declare const setPageSizeMM: (n1: number, n2: number) => number[]; /** * ESC z n - Enable/disable automatic line feed * n = 0 or 48: Disable (default) * n = 1 or 49: Enable * When enabled, printer performs LF after receiving CR */ export declare const enableAutoLineFeed: () => number[]; export declare const disableAutoLineFeed: () => number[]; /** * ESC Q n - Set right margin * Range: 0 ≤ n ≤ 255 * Sets right margin in number of characters from default left margin * New margin becomes valid only on next line if on right side of current position */ export declare const setRightMargin: (chars: number) => number[]; /** * ESC l n - Set left margin * Range: 0 ≤ n ≤ 255 * Sets left margin in number of characters from default left margin * New margin becomes valid only on next line if on left side of current position */ export declare const setLeftMargin: (chars: number) => number[]; /** * HT - Horizontal tab * Moves print position to next tab mark * Default: tabs at every 8 character columns (9, 17, 25, ...) */ export declare const TAB: number[]; /** * ESC D n1 ... nk NUL - Set horizontal tab marks * Range: 1 ≤ n ≤ 255, 0 ≤ k ≤ 32 * Default: intervals of 8 characters for font 12x24 * * Example: setTabPositions([8, 16, 24]) sets tabs at columns 9, 17, 25 * Must be in ascending order and terminated with NUL */ export declare const setTabPositions: (positions: number[]) => number[]; /** * ESC D NUL - Cancel all horizontal tab marks */ export declare const CLEAR_TABS: number[]; /** * ESC a n - Character alignment * n = 0 or 48: Left justified (default) * n = 1 or 49: Center justified * n = 2 or 50: Right justified */ export declare const ALIGN_LEFT: number[]; export declare const ALIGN_CENTER: number[]; export declare const ALIGN_RIGHT: number[]; /** * ESC E - Enable emphasized print mode (bold) * Hexadecimal: 1B 45 * Emphasized mode is bolder than normal print */ export declare const BOLD_ON: number[]; /** * ESC F - Disable emphasized print mode (bold) * Hexadecimal: 1B 46 */ export declare const BOLD_OFF: number[]; /** * ESC - n - Enable/disable underline print mode * n = 0 or 48: Disable (default) * n = 1 or 49: Enable * Underlines every character and space */ export declare const UNDERLINE_ON: number[]; export declare const UNDERLINE_OFF: number[]; /** * ESC 4 - Enable italic print mode * Hexadecimal: 1B 34 * Available in all other print modes */ export declare const ITALIC_ON: number[]; /** * ESC 5 - Disable italic print mode * Hexadecimal: 1B 35 */ export declare const ITALIC_OFF: number[]; /** * ESC } n - Turn upside-down printing mode on/off * n = 0 or 48: Disable (default) * n = 1 or 49: Enable */ export declare const UPSIDE_DOWN_ON: number[]; export declare const UPSIDE_DOWN_OFF: number[]; /** * ESC S n - Enable superscript or subscript print mode * n = 0 or 48: Superscript (print on upper side of line) * n = 1 or 49: Subscript (print on bottom side of line) */ export declare const SUPERSCRIPT_ON: number[]; export declare const SUBSCRIPT_ON: number[]; /** * ESC T - Disable superscript and subscript print modes * Hexadecimal: 1B 54 */ export declare const SCRIPT_OFF: number[]; /** * ESC ! n - Select print mode (combined control) * Bits: * 0-2: Undefined * 3: Emphasized (0=clear, 1=set) * 4: Double height (0=clear, 1=set) * 5: Double width (0=clear, 1=set) * 6: Undefined * 7: Underline (0=clear, 1=set) */ export declare const calculatePrintMode: (options: { emphasized?: boolean; doubleHeight?: boolean; doubleWidth?: boolean; underline?: boolean; }) => number[]; /** * ESC d n - Enable/disable double height print mode * n = 0 or 48: Disable (default) * n = 1 or 49: Enable * * IMPORTANT: This is different from ESC/POS where ESC d is used for line feed */ export declare const DOUBLE_HEIGHT_ON: number[]; export declare const DOUBLE_HEIGHT_OFF: number[]; /** * ESC V - Enable on-line double height mode * If received at beginning of line: valid for whole line * Otherwise: valid only for next incoming characters * Returns to normal mode on next line */ export declare const DOUBLE_HEIGHT_ONLINE: number[]; /** * ESC W n - Enable/disable expanded mode (double width) * n = 0 or 48: Disable (default) * n = 1 or 49: Enable * Takes effect immediately */ export declare const DOUBLE_WIDTH_ON: number[]; export declare const DOUBLE_WIDTH_OFF: number[]; /** * ESC SO - Enable on-line expanded mode * Hexadecimal: 1B 0E * If received at beginning of line: valid for whole line * Otherwise: valid only for next incoming characters * Returns to normal mode on next line */ export declare const EXPANDED_ONLINE: number[]; /** * SO - Enable on-line expanded mode (alternate) * Hexadecimal: 0E * Same as ESC SO */ export declare const EXPANDED_ONLINE_ALT: number[]; /** * DC4 - Disable on-line expanded print * Hexadecimal: 14 * Disables expanded mode if previously set by ESC SO or SO */ export declare const EXPANDED_OFF: number[]; /** * ESC SI - Enable condensed mode * Hexadecimal: 1B 0F */ export declare const CONDENSED_ON: number[]; /** * SI - Enable condensed mode (alternate) * Hexadecimal: 0F * Same as ESC SI */ export declare const CONDENSED_ON_ALT: number[]; /** * ESC H - Disable condensed mode * Hexadecimal: 1B 48 * Same as DC2 or ESC P */ export declare const CONDENSED_OFF: number[]; /** * ESC P - Disable condensed mode (alternate) * Hexadecimal: 1B 50 * Same as DC2 or ESC H */ export declare const CONDENSED_OFF_ALT: number[]; /** * DC2 - Disable condensed mode (alternate) * Hexadecimal: 12 * Same as ESC H or ESC P */ export declare const CONDENSED_OFF_DC2: number[]; /** * ESC $ n1 n2 - Fill in blank bit columns * Fills blank bit columns from current column to column (n1 + n2 × 256) * Must be ≤ printing width N */ export declare const fillBlankColumns: (columns: number) => number[]; /** * ESC * ! n1 n2 b1 ... bn - 24-bit graphics * Hexadecimal: 1B 2A 21 n1 n2 b1 ... bn * Downloads 24-bit image with (n1 + n2 × 256) columns * Each column = 3 bytes (24 bits height) * Total bytes needed = columns × 3 */ export declare const print24BitGraphics: (columns: number, data: number[]) => number[]; /** * ESC K n1 n2 b1 ... bn - 8-bit graphics * Hexadecimal: 1B 4B n1 n2 b1 ... bn * Select "8 pin" bit image (compatible with dot-matrix printers) * Columns = n1 + (n2 × 256), each column = 1 byte * Low resolution (expanded to 3 bytes internally) */ export declare const print8BitGraphics: (columns: number, data: number[]) => number[]; /** * Raster bitmap print modes */ export declare enum RasterMode { NORMAL = 0,// 203 dpi × 203 dpi DOUBLE_WIDTH = 1,// 203 dpi × 101 dpi DOUBLE_HEIGHT = 2,// 101 dpi × 203 dpi QUADRUPLE = 3 } /** * GS v 0 m xL xH yL yH d1 ... dk - Print raster bitmap * m: Mode (0-3 or 48-51) * xL, xH: Horizontal bytes = xL + xH × 256 * yL, yH: Vertical bytes = yL + yH × 256 * k = (xL + xH × 256) × (yL + yH × 256) * * Data outside printing area is discarded * Affected by HT, ESC $, ESC \, GS L, and ESC a */ export declare const printRasterBitmap: (mode: RasterMode, width: number, height: number, data: number[]) => number[]; /** * GS * x y d1 ... d(x×y×8) - Define downloaded bit image * Range: 1 ≤ x ≤ 255, 1 ≤ y ≤ 64 * Horizontal dots: x × 8 * Vertical dots: y × 8 * * Cleared by: ESC @, FS q, printer restart, or power cycle */ export declare const defineDownloadedBitImage: (x: number, y: number, data: number[]) => number[]; /** * GS / m - Print downloaded bit image * m: Mode (0-3 or 48-51) - same as RasterMode * No effect if downloaded image not defined */ export declare const printDownloadedBitImage: (mode: RasterMode) => number[]; /** * FS q n [xL xH yL yH d1 ... dn]1 ... [xL xH yL yH d1 ... dn]n * Define NV bit images (stored in non-volatile memory) * * n: Number of NV bit images (1 ≤ n ≤ 255) * xL, xH: Horizontal = (xL + xH × 256) × 8 dots (max 1023 × 8) * yL, yH: Vertical = (yL + yH × 256) × 8 dots (max 288 × 8) * * Erases all previously defined NV images */ export declare const defineNVBitImage: (images: Array<{ width: number; height: number; data: number[]; }>) => number[]; /** * FS p n m - Print non-volatile (NV) bit image * n: NV bit image number (as defined by FS q) * m: Mode (0-3 or 48-51) - same as RasterMode * No effect if n-th NV image not defined */ export declare const printNVBitImage: (imageNumber: number, mode: RasterMode) => number[]; /** * GS h n - Set barcode height * Range: 1 ≤ n ≤ 255 * Default: n = 162 * Height = n × 0.125mm */ export declare const setBarcodeHeight: (n: number) => number[]; /** * GS w n - Set barcode width * Range: 2 ≤ n ≤ 4 * Default: n = 3 * n = 2: Normal width * n = 3: Double width * n = 4: Quadruple width */ export declare const setBarcodeWidth: (width: 2 | 3 | 4) => number[]; /** * Human Readable Information (HRI) position */ export declare enum BarcodeHRIPosition { NONE = 0,// No HRI TOP = 1,// HRI on top of barcode (default) BOTTOM = 2,// HRI on bottom of barcode BOTH = 3 } /** * GS H n - Choose HRI position in barcode * Range: 0 ≤ n ≤ 3 * Default: n = 1 (top) */ export declare const setBarcodeHRI: (position: BarcodeHRIPosition) => number[]; /** * GS f n - Set HRI font * n = 0 or 48: Normal font (default) * n = 1 or 49: Condensed font */ export declare const setBarcodeHRIFont: (condensed: boolean) => number[]; /** * GS k 84h n1 n2 - Program barcode left margin * Margin position = n1 + n2 × 256 */ export declare const setBarcodeLeftMargin: (position: number) => number[]; /** * GS k NUL d1 ... d11 NUL - Print UPC-A barcode * Range: 48 ≤ dn ≤ 57 (ASCII digits '0'-'9') * Requires exactly 11 digits, checksum generated automatically */ export declare const printBarcodeUPCA: (data: string) => number[]; /** * GS k A VT d1 ... d11 - Print UPC-A barcode (alternate) * Same as GS k NUL variant */ export declare const printBarcodeUPCAAlt: (data: string) => number[]; /** * GS k SOH d1 ... d6 NUL - Print UPC-E barcode * Range: 48 ≤ dn ≤ 57 (ASCII digits '0'-'9') * Requires exactly 6 digits, checksum generated automatically */ export declare const printBarcodeUPCE: (data: string) => number[]; /** * GS k B ACK d1 ... d6 - Print UPC-E barcode (alternate) */ export declare const printBarcodeUPCEAlt: (data: string) => number[]; /** * GS k STX d1 ... d12 NUL - Print EAN-13 barcode * Range: 48 ≤ dn ≤ 57 (ASCII digits '0'-'9') * Requires exactly 12 digits, 13th digit generated automatically */ export declare const printBarcodeEAN13: (data: string) => number[]; /** * GS k C FF d1 ... d12 - Print EAN-13 barcode (alternate) */ export declare const printBarcodeEAN13Alt: (data: string) => number[]; /** * GS k ETX d1 ... d7 NUL - Print EAN-8 barcode * Range: 48 ≤ dn ≤ 57 (ASCII digits '0'-'9') * Requires exactly 7 digits, 8th digit generated automatically */ export declare const printBarcodeEAN8: (data: string) => number[]; /** * GS k D BEL d1 ... d7 - Print EAN-8 barcode (alternate) */ export declare const printBarcodeEAN8Alt: (data: string) => number[]; /** * GS k EOT d1 ... dn NUL - Print CODE 39 barcode * Valid characters: 32 (space), 36 ($), 37 (%), 42 (*), 43 (+), 45-57 (-, ., /, 0-9), 65-90 (A-Z) * Checksum generated automatically * Length limited by physical print width and barcode width setting */ export declare const printBarcodeCODE39: (data: string) => number[]; /** * GS k E n d1 ... dn - Print CODE 39 barcode (alternate) */ export declare const printBarcodeCODE39Alt: (data: string) => number[]; /** * GS k ENQ d1 ... dn NUL - Print ITF barcode * Range: 48 ≤ dn ≤ 57 (ASCII digits '0'-'9') * Length limited by physical print width and barcode width setting */ export declare const printBarcodeITF: (data: string) => number[]; /** * GS k F n d1 ... dn - Print ITF barcode (alternate) */ export declare const printBarcodeITFAlt: (data: string) => number[]; /** * GS k ACK d1 ... dn NUL - Print CODABAR barcode * Valid: 36 ($), 43 (+), 45-57 (-, ., /, 0-9), 65-68 (A-D uppercase), 97-100 (a-d lowercase) * Cannot mix uppercase and lowercase letters * If d1 is letter, dn must also be letter */ export declare const printBarcodeCODABAR: (data: string) => number[]; /** * GS k G n d1 ... dn - Print CODABAR barcode (alternate) */ export declare const printBarcodeCODABARAlt: (data: string) => number[]; /** * GS k H n d1 ... dn - Print CODE 93 barcode * Range: 0 ≤ dn ≤ 127 (all ASCII characters) * Checksum generated automatically */ export declare const printBarcodeCODE93: (data: string) => number[]; /** * GS k I n d1 ... dn - Print CODE 128 barcode * Range: 0 ≤ dn ≤ 127 (all ASCII characters) * Checksum generated automatically */ export declare const printBarcodeCODE128: (data: string) => number[]; /** * GS k 80h n1 n2 n3 n4 n5 n6 d1 ... dn - Print PDF-417 barcode * n1: ECC level (0-8) * n2: Pitch height (n2 × 0.125mm) * n3: Pitch width (n3 × 0.125mm, range 1-4) * n4: Codewords per row (0 = max for pitch width) * n5, n6: Byte count (n5 + n6 × 256, must be < 900) */ export declare const printBarcodePDF417: (eccLevel: number, pitchHeight: number, pitchWidth: number, codewordsPerRow: number, data: string) => number[]; /** * GS k NAK d1 ... d9 NUL - Print ISBN barcode * Format: X-XXXXX-XXX-X [XXXXX] (hyphens optional in data) * Last char before space: 'X' (88) or digit * After hyphen+X/digit: optional space + 5 more digits */ export declare const printBarcodeISBN: (data: string) => number[]; /** * GS k SYN d1 ... dn NUL - Print MSI barcode * Range: 48 ≤ dn ≤ 57 (ASCII digits '0'-'9') * Checksum generated automatically */ export declare const printBarcodeMSI: (data: string) => number[]; /** * GS k 82h n d1 ... dn - Print MSI barcode (alternate) */ export declare const printBarcodeMSIAlt: (data: string) => number[]; /** * GS k ETB d1 ... dn NUL - Print PLESSEY barcode * Valid: 48-57 (0-9), 65-70 (A-F uppercase), 97-102 (a-f lowercase) * Cannot mix uppercase and lowercase letters * Checksum generated automatically */ export declare const printBarcodePLESSEY: (data: string) => number[]; /** * GS k 83h n d1 ... dn - Print PLESSEY barcode (alternate) */ export declare const printBarcodePLESSEYAlt: (data: string) => number[]; /** * ENQ - Printer status enquiry * Returns 1 byte with status bits: * Bit 0: 0=offline, 1=online * Bit 1: 0=paper present, 1=paper out * Bit 2: Drawer/paper status (depends on ESC b setting) * Bit 3: 0=print head raised, 1=print head down * Bit 4: 0=paper full, 1=paper near end * Bit 5: 0=command not executed, 1=command executed * Bits 6-7: Unused (always 0) */ export declare const STATUS_ENQUIRY: number[]; /** * GS F8h 1 - Printer extended status enquiry * Returns 5 status bytes with detailed printer information */ export declare const EXTENDED_STATUS: number[]; /** * STX - Clear buffer * Clears print buffer without restoring default printer conditions */ export declare const CLEAR_BUFFER: number[]; /** * ETX - End buffer * Printer remains in BUSY state until print buffer becomes empty * DTR (RTS) remains deactivated while printing on serial interfaces */ export declare const END_BUFFER: number[]; /** * CAN - Cancel last line * Clears last line sent to printer * No action if data already dispatched to print head */ export declare const CANCEL_LINE: number[]; /** * DEL - Cancel last character * Clears last character sent to printer * No action if already dispatched to print head */ export declare const CANCEL_CHAR: number[]; /** * GS F7h BS NUL " i1 i2 i3 i4 s1 s2 s3 s4 - Set IP address and subnet mask * i1-i4: IP address octets * s1-s4: Subnet mask octets * * Example: IP 10.10.1.2, Mask 255.255.0.0 * Command: 1D F7 08 00 22 0A 0A 01 02 FF FF 00 00 * * Valid only for ethernet or wi-fi interface */ export declare const setIPAddress: (ip: [number, number, number, number], subnet: [number, number, number, number]) => number[]; /** * GS F7h EOT NUL ' g1 g2 g3 g4 - Set default gateway IP address * g1-g4: Gateway IP address octets * Default: 0.0.0.0 * * Example: Gateway 192.168.1.2 * Command: 1D F7 04 00 27 C0 A8 01 02 */ export declare const setGateway: (gateway: [number, number, number, number]) => number[]; /** * GS F9h E n - Set DHCP usage * LSB of n: 0 = DHCP disabled (default), 1 = DHCP enabled * Saves to non-volatile memory * Valid only for ethernet or wi-fi interface */ export declare const enableDHCP: () => number[]; export declare const disableDHCP: () => number[]; /** * GS F9h S m ip1 ip2 ip3 ip4 n c1 ... cn - Set SNMP settings * m: 0 = disabled, non-zero = enabled * ip1-ip4: SNMP trap IP address * n: Community name length (0-64) * c1-cn: Community name bytes * * Valid only for ethernet or wi-fi interface */ export declare const setSNMP: (enabled: boolean, ip: [number, number, number, number], community: string) => number[]; /** * GS F9h W a s c m n e1...em p1...pn - Set Wi-Fi settings * a: Access mode (0=Access Point, 1=Ad-hoc) * s: Security mode (0=None, 1=WEP 64-bit, 2=WEP 128-bit, 3=WPA-TKIP, 4=WPA2-AES) * c: Channel (0-13, use 0 when a=0) * m: ESSID size (0-32) * n: Passphrase size (0-63) * e1-em: ESSID bytes * p1-pn: Passphrase bytes * * Valid only for wi-fi interface */ export declare const setWiFi: (accessMode: 0 | 1, securityMode: 0 | 1 | 2 | 3 | 4, channel: number, essid: string, passphrase: string) => number[]; /** * Convert string to code page bytes * Uses CP860 encoding by default (Portuguese) */ export declare const encodeText: (text: string, codePage?: CodePage) => number[]; /** * Validate barcode data */ export declare const validateBarcodeData: (data: string, type: "numeric" | "alphanumeric" | "all") => boolean; //# sourceMappingURL=escbematech.d.ts.map