Every element in aDocumentation 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.sections array must be a PrintSections discriminated union object — { Title: { text: '...' } }, { Cut: { mode: 'partial', feed: 4 } }, and so on. The builder helpers exported by tauri-plugin-thermal-printer create these wrapper objects for you, with sensible defaults pre-applied, so you can write readable, concise section arrays without repeating the union key on every line.
Each builder always returns a PrintSections value and can be used directly inside a sections array or composed into variables.
title
{ Title: { text, styles } } section. The backend renders titles with forced double size and center alignment unless overridden in styles.
Title text to print.
Optional style overrides applied on top of the title defaults.
subtitle
{ Subtitle: { text, styles } } section. The backend renders subtitles with forced bold and height size unless overridden.
Subtitle text to print.
Optional style overrides applied on top of the subtitle defaults.
text
{ Text: { text, styles } } section for general body text. Inherits the current global styles when styles is omitted.
Body text to print.
Optional per-section style overrides.
line
{ Line: { character } } section that repeats character across the full paper width.
Single character to repeat (e.g.
'-', '=', '_', '*').feed
{ Feed: { feed_type, value } } section that advances the paper.
Amount to advance. Unit depends on
feed_type.'lines' — advance N lines (ESC d n); 'dots' — advance N dot rows (ESC J n); 'line_feed' — send N raw LF characters.cut
{ Cut: { mode, feed: feedLines } } section.
'full' | 'partial' | 'partial_alt' | 'partial_alt2'.Lines to advance before cutting.
globalStyles
{ GlobalStyles: styles } section. When the backend encounters this section it updates the running default styles applied to subsequent Title, Subtitle, Text, and Table sections.
Style values to set as the new global default.
beep
{ Beep: { times, duration } } section that triggers the printer’s built-in buzzer.
Number of beeps (1–9).
Duration per beep in milliseconds (1–255).
drawer
{ Drawer: { pin, pulse_time } } section that opens the cash drawer.
Drawer kick pin. Most cash drawers use pin 2.
Kick pulse duration in milliseconds.
table
{ Table: { ... } } section. The truncate option defaults to true when using the builder (the raw interface requires it to be set explicitly).
Number of columns.
Data rows. Each inner array must have exactly
columns elements.qr
{ Qr: { ... } } section.
QR payload. Must not be empty. Maximum length depends on
error_correction.barcode
{ Barcode: { ... } } section.
Barcode payload. Must not be empty.
One of:
'UPC-A' | 'UPC-E' | 'EAN13' | 'EAN8' | 'CODE39' | 'ITF' | 'CODABAR' | 'CODE93' | 'CODE128'.dataMatrix
{ DataMatrix: { data, size } } section.
DataMatrix payload.
Module size 1–16.
pdf417
{ Pdf417: { ... } } section.
PDF417 payload.
image
{ Image: { ... } } section. Base64 strings with or without a data: URI prefix are both accepted.
Base64-encoded image. Must not be empty.
logo
{ Logo: { key_code, mode } } section that prints a logo previously stored in the printer’s NV memory.
NV memory key code (1–255).
Print scale —
'normal' | 'double_width' | 'double_height' | 'quadruple'.