Media sections let you embed visual content in a print job. TheDocumentation 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.
Image section renders any base64-encoded raster image, automatically converting it to the monochrome bitmap format required by thermal printers. The Logo section recalls a pre-programmed graphic stored directly in the printer’s non-volatile (NV) memory, printing it instantly without transferring pixel data at runtime.
Image
TheImage section accepts a base64-encoded image, resizes it to fit the specified max_width, converts it to monochrome, and sends the resulting bitmap to the printer. Color and grayscale images are automatically reduced to black-and-white — optionally using Floyd-Steinberg dithering for significantly improved tone reproduction.
Base64-encoded image data. Both plain base64 strings and data URIs (e.g.
data:image/png;base64,...) are accepted. Must not be empty.Maximum rendering width in pixels.
0 uses the full paper width automatically. Values larger than the paper width are clamped to the paper width — no manual calculation required.Horizontal alignment of the image on the paper.
Apply Floyd-Steinberg dithering before sending to the printer. Recommended
true for photographs and gradients; may be set to false for sharp black-and-white graphics (logos, icons) that do not benefit from dithering.Output size multiplier applied after rendering.
"quadruple" doubles both width and height.Floyd-Steinberg dithering
Thermal printers can only print black or white dots — there are no gray levels. Floyd-Steinberg dithering converts a color or grayscale image to pure monochrome by distributing the quantization error of each pixel to its neighbors, creating the visual illusion of continuous tones through patterns of black and white dots. This is especially beneficial for photographs and images with gradients; for binary logos or icons already in black and white, dithering has little effect and may be disabled.Paper width reference
| Paper size | Pixel width | Notes |
|---|---|---|
Mm40 | 256 px | Handheld ticket printers |
Mm44 | 288 px | Compact POS |
Mm58 | 384 px | Common portable format |
Mm72 | 512 px | Mid-range |
Mm80 | 576 px | Standard large format (default) |
Mm104 | 752 px | Wide format |
max_width: 0 automatically uses the full printable width of the selected paper size. You do not need to look up the pixel width manually — just pass 0 and the plugin resolves it from paper_size.Logo
TheLogo section instructs the printer to recall and print a graphic stored in its NV (non-volatile) memory by key code. NV logos are pre-programmed into the printer firmware using the printer’s own configuration utility or setup software — they are not transmitted during the print job. This makes logo printing nearly instantaneous with no data transfer overhead.
The NV memory key index (1–255) that identifies the pre-stored logo.
Output size multiplier for the recalled logo image.
The logo must be pre-programmed into the printer’s NV memory before use. How you store logos varies by printer model and manufacturer — consult your printer’s manual or utilities (e.g. Epson TM-Utility for Epson printers). If no logo is stored at the given
key_code, the printer typically prints nothing or a blank space.