Use this file to discover all available pages before exploring further.
The TypeScript package exposes three async functions that communicate with the Rust backend via Tauri’s IPC layer. Each function invokes a named command on the plugin:thermal-printer channel and returns a Promise that resolves on success or throws a descriptive string on failure. All three functions must be called from the Tauri frontend context.
async function print_thermal_printer(printJobRequest: PrintJobRequest): Promise<void>
Sends a fully-described print job to the specified thermal printer. The Rust backend converts the sections array into raw ESC/POS bytes and dispatches them to the printer via the operating-system print subsystem (CUPS on Linux/macOS, WinAPI on Windows, Bluetooth SPP on Android).IPC command:plugin:thermal-printer|print_thermal_printer
async function list_thermal_printers(): Promise<PrinterInfo[]>
Queries the operating system for all configured printers and returns their metadata. On Linux and macOS this calls lpstat; on Windows it uses EnumPrintersW via WinAPI.IPC command:plugin:thermal-printer|list_thermal_printers
async function test_thermal_printer(testPrintRequest: TestPrintRequest): Promise<void>
Sends a structured test job to a printer so you can verify each capability (text styles, barcodes, QR codes, images, feeds, beep, cash drawer, etc.) without writing a full print job by hand. Every test section is opt-in; set only the flags you need.IPC command:plugin:thermal-printer|test_thermal_printer
Printer configuration (same as PrintJobRequest). The sections array is ignored — the backend builds test sections automatically based on the flags below.
Field
Type
Default
Description
include_text
boolean
false
Print a basic text sample.
include_custom_text
boolean
false
Print the value of custom_text.
custom_text
string | null
null
Custom text printed when include_custom_text is true.
include_text_styles
boolean
false
Print bold, underline, and inverted style samples.
include_alignment
boolean
false
Print left, center, and right alignment samples.
include_columns
boolean
false
Print a multi-column table sample.
include_separators
boolean
false
Print horizontal separator line samples.
include_barcode
boolean
false
Print a CODE128 barcode sample.
include_barcode_types
boolean
false
Print one sample for every supported barcode type.
The sections array inside printer_info is not used during a test print. The backend generates all test content automatically from the flags you enable.