Skip to main content

Documentation 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.

Tauri Plugin Thermal Printer lets you print receipts, tickets, barcodes, QR codes, images, and more from your Tauri application without ever touching raw ESC/POS bytes. Write your print jobs in TypeScript, and the plugin handles protocol translation for every supported platform.

Introduction

Understand what the plugin does, how it works, and which platforms it supports.

Installation

Add the Rust crate and npm package to your Tauri project in minutes.

Quickstart

List printers, build your first print job, and send it to a thermal printer.

API Reference

Full TypeScript function signatures, types, constants, and builder helpers.

What you can print

Text & Tables

Titles, subtitles, styled body text, and multi-column tables with optional headers.

Barcodes & QR

QR codes, barcodes (CODE128, EAN13, and more), DataMatrix, and PDF417.

Images & Logos

Base64 images with Floyd-Steinberg dithering and NV-memory logos.

Control Commands

Feed paper, cut, beep, open cash drawers, and apply global text styles.

Android / Bluetooth

Discover and print to Bluetooth thermal printers on Android via SPP.

Examples

Ready-to-use receipts, tickets, and advanced multi-section print jobs.

Get started in three steps

1

Install the plugin

Add tauri-plugin-thermal-printer to both your Rust and JavaScript dependencies.
cargo add tauri-plugin-thermal-printer
npm install tauri-plugin-thermal-printer
2

Register the plugin

Call tauri_plugin_thermal_printer::init() in your lib.rs and add permissions to your capabilities file.
lib.rs
.plugin(tauri_plugin_thermal_printer::init())
3

Print your first document

Import the TypeScript helpers and send a print job from your frontend.
import { list_thermal_printers, print_thermal_printer, title, cut } from "tauri-plugin-thermal-printer";

const printers = await list_thermal_printers();
await print_thermal_printer({
  printer: printers[0].name,
  paper_size: "Mm80",
  options: { code_page: 0 },
  sections: [title("Hello, World!"), cut()],
});

Build docs developers (and LLMs) love