Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

How to Print Images and QR Codes on an ESP32 Thermal Printer

A practical guide to printing monochrome images and pre-generated QR codes from an ESP32, including bitmap sizing, Adafruit’s printBitmap() API, printer compatibility and power checks.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To print an image or QR code from an ESP32, convert it to a monochrome bitmap that fits your printer’s printable width, then send it using that printer’s supported interface and protocol. With Adafruit’s Arduino thermal printer library, the printBitmap() API handles bitmap output; the library example prints a QR code that was generated beforehand, rather than creating the QR code itself.

First, check what your printer supports

“ESP32 thermal printer” does not identify a single printer protocol. Before choosing a library or adapting an example, check the exact printer model, interface, command set, printable width, resolution, power requirements and paper size. An example written for a TTL-serial printer is not automatically suitable for a Bluetooth printer, a USB-only model or a printer using a different ESC/POS implementation.

As an Amazon Associate I earn from qualifying purchases.

Adafruit’s documented example uses a TTL-serial printer and its Arduino thermal printer library. The cited Adafruit printer is marked no longer stocked, so treat its documentation as an example of a bitmap-printing workflow, not as a current buying recommendation. See the product page and the printer overview.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Prepare an image as a printer-sized bitmap

  1. Resize the image. Fit it within the printer’s printable width. For the cited Adafruit Tiny Thermal Receipt Printer, the product page specifies 384 dots per line; that figure applies to that model, not to every thermal printer. Check your printer’s own specification at Adafruit’s product page.
  2. Convert it to monochrome. Thermal printers produce dark and light marks rather than full-colour output. Convert the source image to a one-bit black-and-white bitmap, adjusting contrast or dithering if needed so important details remain distinct.
  3. Check the width in pixels. Adafruit’s guide says its bitmap data is processed in horizontal groups of eight pixels. If the width is not divisible by eight, the library crops it to the next smaller multiple of eight. For that library, choose a width divisible by eight and within the printer’s printable width. See the full guide.
  4. Store or stream the bitmap. The library documents bitmap calls that accept width, height and bitmap data, including a printBitmap(w, h, bitmap, fromProgMem) form and stream overloads. Use the overload that matches how your image data is stored; consult the class reference and library header.

With the Adafruit library, the core call has this shape:

#1 Best Overall
Lonely Binary 58mm Thermal Receipt Printer Kit Type-C for ESP32 & C++
  • 【Complete Ready-to-Use Kit】Includes 58mm thermal receipt printer module and Lonely Binary Type-C TTL Base Board for ESP32-S3, Raspberry Pi Pico, and other 3.3V/5V microcontrollers
  • 【Single-Cable Smart Power System】Base board negotiates with USB-C PD adapters to supply 9V to the printer while powering your MCU simultaneously
  • 【Simplified Wiring Setup】Only one Type-C cable and one PD charger required; eliminates multiple power supplies and reduces wiring complexity
  • 【Important Power Requirement】Requires USB-C PD adapter with 9V output. Standard USB or PC Type-C ports (5V only) will NOT power the printer
  • 【Optimized for Receipt Printing】Supports UART TTL and RS232. 203 DPI resolution, 50–80 mm/s print speed, 48mm effective width on 58mm paper—ideal for receipts, bills, and tickets
printer.printBitmap(width, height, bitmap, true);

This illustrates the API call only. It assumes printer has already been set up for a compatible printer, and that bitmap, its dimensions and the final argument match the library’s expected data format and storage. It is not a complete ESP32 sketch or a substitute for the model-specific connection and initialization instructions.

Print a QR code as an image

Generate the QR code before printing

Create the QR code with a QR-generation tool or library, then export or convert its graphic to a monochrome bitmap. The Adafruit printer example contains a pre-generated QR image in a header array and prints it with printBitmap(); this demonstrates bitmap printing, not QR generation by the printer library. The example uses a 135-by-135-pixel QR bitmap. That is an example dimension, not a universally reliable size. See the official printer test example.

Rank #2
PRIMUZ Micro Thermal Printer Ticket Serial Port Printer Module Can Be Docked with Arduino/ESP32, Supporting Secondary Development TTL/RS232 White
  • The 58mm embedded micro thermal printer has excellent performance, clear printing and beautiful structure, and is widely used in medical instruments, testing instruments and other equipment. CAD or 3D drawings are available. It works perfectly with your device, making printing easier than ever. Easily embedded into any type of instrumentation for printing.
  • This thermal receipt printer can be connected to Arduino,MCU, Android, Linux, Windows systems and other platforms, and Android provides a secondary development kit. It can easily print text, pictures, barcodes, QR codes, etc. Provide ESC/POS printing instruction set and development materials.
  • The printer supports a wide voltage range of 12V~24V, and the maximum voltage cannot exceed 24V. We provide three physical interfaces, RS232/TTL+USB, with TTL as the default. If you need to switch to RS232, you can contact us by email and we will tell you how to switch.
  • We really like this printer because its easy to make Bold, underline , inverted text , variable line spacing, left/center/right justification, barcodes with adjustable height, and even custom QR code.
  • Open the paper compartment cover on the front panel to change the paper, the operation is simple and convenient. The structure is beautiful, and the slider can be moved to fix the printer on the device by twisting the screws on both sides of the paper bin.

Test the printed code with the intended scanner

Keep the QR modules crisp and high-contrast when converting the image. Print a sample at the intended physical size and density, then scan it with the device or app your audience will use. The cited documentation does not establish a universally reliable QR size or density, so verify the result on your own printer and paper rather than assuming the example’s pixel dimensions will scan in every setup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Connect and power the printer safely

Use wiring, voltage levels, baud rate and initialization appropriate to the exact printer and ESP32 interface. The Adafruit example is for TTL serial; its settings should not be copied to a different printer without checking that printer’s documentation. The cited Adafruit product page lists 5–9 V power, while its overview recommends a regulated supply capable of 2 A or more during high-current printing. Those are recommendations for the described Adafruit printer, not universal ESP32-printer specifications. Do not assume the ESP32 board can supply the printer’s printhead current. See the product page and overview.

Rank #3
Maikrt Micro Thermal Printer 5~9V Embedded Thermal Receipt Printer Serial Port Microcontroller Secondary Development MCU Printing Module TTL/RS232
  • The 58mm embedded micro thermal printer has excellent performance, clear printing and beautiful structure, and is widely used in medical instruments, testing instruments and other equipment. CAD or 3D drawings are available. It works perfectly with your device, making printing easier than ever. Easily embedded into any type of instrumentation for printing.
  • This thermal receipt printer can be connected to MCU, Android, Linux, Windows systems and other platforms, and Android provides a secondary development kit. It can easily print text, pictures, barcodes, QR codes, etc. Provide ESC/POS printing instruction set and development materials.
  • The power supply of the printer is 5~9V; the physical interface of RS232/TTL+USB is provided, and the default is RS232. If you need to switch to TTL, you can contact us and we will tell you how to switch.
  • We really like this printer because its easy to make Bold, underline , inverted text , variable line spacing, left/center/right justification, barcodes with adjustable height, and even custom QR code.
  • Open the paper compartment cover on the front panel to change the paper, the operation is simple and convenient.The structure is beautiful, and the slider can be moved to fix the printer on the device by twisting the screws on both sides of the paper bin.

For the same cited model, Adafruit specifies 58 mm (2.25-inch) thermal paper. Verify both paper width and the maximum roll diameter allowed by your printer’s enclosure before loading a roll; other models may use different stock.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why a barcode command is not the same as QR printing

The Adafruit library documents printBarcode() as well as bitmap-printing methods. Its guide discusses printer-supported linear barcode commands separately from QR codes, which it prints as pre-generated images. Do not assume that a printer’s barcode command accepts QR data: check the printer’s command set and library documentation, or use the bitmap route when the printer supports raster output. See the class reference and guide overview.

Best Value
Maikrt Embedded 58MM Thermal Receipt Printer Mini Printing Module Support USB and TTL Serial Port ESC/POS Commands
  • The embedded 58mm thermal printer module has good performance and is widely used in instruments, detection instruments, and other devices that require printing thermal sensitive small ticket paper. Compact and easy to operate, it can perfectly match your device, easily embed any type of instrument and meter, making printing more convenient.
  • Low noise thermal printing,Support text, bar code, QR code etc printing,Provide ESC/POS print instruction set And development materials.
  • Opening the paper bin cover on the front panel facilitates paper replacement; Different interfaces are optional (TTL/RS232+USB), with RS232 as the default; If you need to use TTL, you can contact us via email and we will guide you on how to switch to TTL;
  • This thermal ticket printer supports platforms such as microcontroller development, Android system development, Linux, Windows system serial port development, and USB driver printing
  • Package List:1 * Printer;1 * USB Cable;1 * Wiring Harness;Compatible System: Windows, IOS, Linux, Android;Item Size: 82*58*44MM/ 32.29*22.84*17.33 in.
Rank #4
Sale
Oreilet Embedded Thermal Receipt Printer, 58mm Print Width Microcontroller Secondary Development MCU Printing Module 5 to 9V Support BT USB TTL RS232 Serial Port
  • Versatile Compatibility: This thermal receipt printer can be connected to MCU, for Andr, for Window and other platforms, for Andr provides secondary development kit, provide ESC, POS printing instruction set and development materials.
  • Flexible Connectivity: The embedded thermal printer features multiple interfaces, including RS232, TTL, USB, BT. You can choose the appropriate serial connection based on your requirements.
  • Simple Operation: Simply open the paper compartment cover on the front panel to replace the paper, and by twisting the screws on both sides of the paper compartment, the slider can be moved to fix the printer to the device.
  • Small Program Upgrade: Clear small program upgrade setting interface, solving the problem of non disassembly and non return to factory upgrade and maintenance.
  • Wide Applications: This embedded printer is suitable for industrial equipment control panel, cash register, self service machine, vehicle printing equipment, laboratory instrument, etc.

If the output is missing or unreadable

  • No image prints: confirm the selected library supports your printer’s interface and command set, and that the printer is initialized for that model. The Adafruit bitmap example is for its supported TTL-serial setup, not a generic printer command.
  • The right edge is cut off: check the printer’s printable pixel width. With the Adafruit library, also check that the bitmap width is divisible by eight, because an excess partial group is cropped.
  • The image looks muddy: reconvert it to monochrome and adjust contrast or dithering; simplify fine detail that cannot survive the printer’s resolution.
  • The QR code does not scan: test a fresh print at a larger physical size or different density, and scan it with the intended reader. The example’s 135-by-135-pixel bitmap is not a guaranteed minimum or universal target.
  • The printer resets or output fades during printing: check the model’s power requirements and supply capacity. For the cited Adafruit printer, the overview recommends a regulated supply capable of at least 2 A during high-current printing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.