task_receipts/server/src/printer/printer-constants.ts

33 lines
679 B
TypeScript

export const PRINTER_CONFIG = {
ENCODING: 'CP437',
DEFAULT_USER_ID: 1,
} as const;
export const FONT_SIZES = {
NORMAL: { width: 1, height: 1 }, // 0.08 x 2.13 mm
SMALL: { width: 1, height: 1 }, // Same as normal for now, but can be adjusted if needed
LARGE: { width: 2, height: 2 }, // Double size
} as const;
export const BARCODE_CONFIG = {
TYPE: 'CODE128',
DIMENSIONS: { width: 2, height: 50 },
} as const;
export const PAPER_CONFIG = {
BANNER_LENGTH: 32,
CUT_LINES: 2,
} as const;
export const ALIGNMENT = {
CENTER: 'ct',
LEFT: 'lt',
} as const;
export const FONT = {
DEFAULT: 'a',
} as const;
export const STYLE = {
BOLD: 'b',
} as const;