npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-usb-thermal-printer-broadcasting

v1.0.4

Published

React Native USB Thermal Printer for ESC/POS printers with paper cut and feed support. A perfect libarary to manage USB thermal printing, with Broadcast feature.

Readme

npm version license

React Native USB Thermal Printer

A React Native library for printing to USB thermal printers on Android using ESC/POS commands.

This package allows React Native applications to easily connect to a USB thermal printer and print formatted text.

It is designed for POS systems, billing apps, restaurant printers, and receipt printing.


Features

✔ USB Thermal Printer Support
✔ Works with ESC/POS printers
✔ Supports 2-inch (58mm), 3-inch (80mm), and 4-inch (110mm) paper widths ✔ Fast printing performance
✔ Simple API for React Native developers


Platform Support

| Platform | Supported | | -------- | --------- | | Android | ✅ Yes | | iOS | ❌ No |

USB host access is only available on Android devices.


Installation

Install the package:

npm npm install react-native-usb-thermal-printer-broadcasting

or

yarn add npm install react-native-usb-thermal-printer-broadcasting

Android Requirements

Make sure your Android device supports USB OTG and the printer is connected using a USB OTG cable.

The library automatically links using React Native autolinking.

Minimum Android SDK:

minSdkVersion = 21

Usage

Import the library:

import UsbPrinter from "npm install react-native-usb-thermal-printer-broadcasting";

1️⃣ Scan for USB Printer

const printer = await UsbPrinter.scanPrinters();
console.log("Printer Found:", printer);

2️⃣ Print Text

Example Receipt


Available Sizes: MM58, MM80, MM100
await UsbPrinter.printText(
  "[C]<b>USB TEST PRINT</b>\n" +
  "[C]================\n" +
  "[L]Product[R]Price\n" +
  "[L]Coffee[R]10\n" +
  "[L]Burger[R]50\n" +
  "{cut}",
  UsbPrinter.PAPER_SIZES.MM80
);

Supported Paper Sizes

| Paper | Width | | ------ | ----- | | 2 inch | 58mm | | 3 inch | 80mm | | 4 inch | 110mm |



---

## ESC/POS Formatting

You can use ESC/POS tags for formatting:

| Tag                 | Description  |
| ------------------- | ------------ |
| `[L]`               | Left Align   |
| `[C]`               | Center Align |
| `[R]`               | Right Align  |
| `<font size='big'>` | Large Text   |
| `<b>`               | Bold Text    |

Example:

[C]HELLO


---

## Requirements

- React Native 0.71+
- Android device with USB OTG support
- ESC/POS compatible printer

---

## Example Use Cases

• POS systems
• Restaurant order printers
• Billing applications
• Receipt printing
• Warehouse label printing

---

## Troubleshooting

### Printer not detected

Make sure:

• USB OTG cable is connected
• Printer is powered on
• Device supports USB host

---

### Permission denied

Reconnect the printer and allow USB permission when prompted.

---

## License

MIT License

---

## Author

Created by **Ashwani Panchal (Devroid)**