Tauri Plugin Thermal Printer is a Tauri v2 plugin that gives your desktop and Android applications a clean TypeScript/JavaScript API for printing to ESC/POS thermal printers. Instead of wrestling with raw escape-sequence bytes or platform-specific printer drivers, you describe your receipt, label, or ticket as a structuredDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/luis3132/tauri-plugin-thermal-printer/llms.txt
Use this file to discover all available pages before exploring further.
PrintJobRequest — titles, text, tables, barcodes, QR codes, images, and more — and the plugin handles everything else: generating the binary ESC/POS commands in Rust, routing them to the correct operating-system interface, and sending them over USB, network, or Bluetooth to your printer.
How It Works
The plugin acts as a translator between a friendly JavaScript/TypeScript API and the low-level binary protocol that thermal printers speak. All ESC/POS command generation is done in a single shared Rust pipeline (ProcessPrint), so receipts look identical regardless of platform.
list_thermal_printers()— enumerate available printers on the current systemprint_thermal_printer(job)— send a structured print job to a named printertest_thermal_printer(request)— run a built-in test print to verify a printer works
Platform Support
| Platform | Supported | Notes |
|---|---|---|
| Linux | ✅ | Fully functional via CUPS (lpstat, lp) |
| macOS | ✅ | Fully functional via CUPS |
| Windows | ✅ | Fully functional via WinAPI (EnumPrintersW, WritePrinter) |
| Android | ✅ | Bluetooth (SPP/RFCOMM) and USB printer discovery |
| iOS | ❌ | Not implemented |
Connection Type Support
| Connection | Linux | macOS | Windows | Android |
|---|---|---|---|---|
| USB | ✅ | ✅ | ✅ | ✅ (discovery only) |
| Network | ✅ | ✅ | ✅ | ❌ |
| Bluetooth | ❌ | ❌ | ❌ | ✅ |
On Android the
printer field in PrintJobRequest must be the Bluetooth MAC address of a previously paired printer (e.g. "AA:BB:CC:DD:EE:FF"). Bluetooth runtime permissions are requested automatically — you do not need to declare them yourself.Key Features
Cross-Platform Printing
A single TypeScript API targets Linux, macOS, Windows, and Android. ESC/POS generation is shared across all platforms in Rust, so output is byte-for-byte consistent.
Rich Section Types
Build print jobs from titles, subtitles, plain text, tables, barcodes, QR codes, DataMatrix, PDF417, images, logos, separator lines, paper cuts, beeps, and cash-drawer pulses.
Builder Helpers
The npm package ships typed builder functions —
title(), text(), line(), cut(), qr(), barcode(), and more — so you never write raw object literals or guess enum names.Style Constants
Exported constants (
TEXT_ALIGN, TEXT_SIZE, BARCODE_TYPE, QR_ERROR_CORRECTION, …) give you autocomplete-friendly access to every string value the plugin accepts.Flexible Encoding
CodePage lets you choose the ESC t n page number sent to the printer and the host-side encoding strategy (ENCODE.WINDOWS_1252, ENCODE.GBK, ENCODE.SHIFT_JIS, ENCODE.ACCENT_REMOVER, and every encoding_rs static).Tauri v2 Permissions
Three granular capabilities —
allow-list-thermal-printers, allow-print-thermal-printer, allow-test-thermal-printer — integrate with Tauri v2’s capability system so you only grant what your app needs.Version Information
| Package | Version |
|---|---|
tauri-plugin-thermal-printer (Rust crate) | 2.0.1 |
tauri-plugin-thermal-printer (npm package) | 2.0.1 |
| Tauri | v2 |