import { CommandAdapter } from "./command-adapters"; /** * ESC/POS Command Generator * Manages the buffer and context for generating ESC/POS commands * Pure JavaScript implementation - no Node.js dependencies */ export declare class ESCPOSGenerator { private buffer; private context; private commandAdapter; constructor(paperWidth?: number, encoding?: string, debug?: boolean, commandAdapter?: CommandAdapter); /** * Initialize printer * Sets up the printer with default settings and comfortable line spacing */ initialize(): void; /** * Set line spacing using command adapter * @param dots - Line spacing in dots (0-255). Use 0 for minimal spacing, undefined for default (1/6 inch) */ setLineSpacing(dots?: number): void; /** * Set text alignment using command adapter */ setAlign(align: "left" | "center" | "right"): void; /** * Set text bold * Uses ESC ! command which combines size and emphasis */ setBold(bold: boolean): void; /** * Set text size using width and height multipliers * Uses ESC ! command which combines size and emphasis * @param size - Character size as {width, height} multipliers (max 2x2 for ESC !) */ setSize(size: { width: number; height: number; }): void; /** * Apply current print mode (size + bold) using command adapter * This combines character size and emphasis into a single command */ private applyPrintMode; /** * Reset text formatting to defaults */ resetFormatting(): void; /** * Add text with current formatting */ addText(text: string): void; /** * Add newline using command adapter */ addNewline(count?: number): void; /** * Add line feed using command adapter */ addLineFeed(lines?: number): void; /** * Add divider line */ addDivider(dashed?: boolean): void; /** * Add QR code using command adapter */ addQRCode(data: string, size?: number): void; /** * Add image from base64 or data URI * Converts image to monochrome bitmap and prints using ESC/POS raster graphics * @param source - Base64 string, data URI, or object with uri property */ addImage(source: string | { uri: string; }): Promise; /** * Apply text styles from style object */ applyTextStyle(style: any): void; /** * Apply spacing from view style */ applyViewSpacing(style: any, type: "before" | "after"): void; /** * Cut paper with full cut using command adapter */ cutFull(): void; /** * Cut paper with partial cut using command adapter */ cutPartial(): void; /** * Cut paper with feed then full cut using command adapter * @param lines - Number of lines to feed before cutting (1-255) */ cutFullWithFeed(lines?: number): void; /** * Cut paper with feed then partial cut using command adapter * @param lines - Number of lines to feed before cutting (1-255) */ cutPartialWithFeed(lines?: number): void; /** * Add raw ESC/POS command * @param data - Raw buffer data to send to printer */ addRawCommand(data: Buffer): void; /** * Get the final buffer */ getBuffer(): Buffer; /** * Get paper width */ getPaperWidth(): number; } //# sourceMappingURL=generator.d.ts.map