Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-native-thermal-receipt-printer

> 编程语言
Open source

A RN library for thermal printer

199 stars0 likes0 views
WebsiteGitHub

About

A RN library for thermal printer

react-native-thermal-receipt-printer

Fork of react-native-printer and add implement for auto connect printer with usb A React Native Library to support USB/BLE/Net printer

Installation

yarn add react-native-thermal-receipt-printer

Troubleshoot

  • when install in react-native version >= 0.60, xcode show this error
duplicate symbols for architecture x86_64

that because the .a library uses CocoaAsyncSocket library and Flipper uses it too

Podfile

...
  use_native_modules!

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  # add_flipper_pods!
  # post_install do |installer|
  #   flipper_post_install(installer)
  # end
...

and comment out code related to Flipper in ios/AppDelegate.m

Support

Printer Android IOS
USBPrinter :heavy_check_mark:
BLEPrinter :heavy_check_mark: :heavy_check_mark:
NetPrinter :heavy_check_mark: :heavy_check_mark:

Predefined tag

Tags Description
C Center
D Medium font
B Large font
M Medium font
CM Medium font, centered
CB Medium font, centered
CD Large font, centered

Development workflow

To get started with the project, run yarn bootstrap in the root directory to install the required dependencies for each package:

yarn bootstrap

While developing, you can run the example app to test your changes.

To start the packager:

yarn example start

To run the example app on Android:

yarn example dev-android

To run the example app on iOS:

yarn example ios

Usage

import {
  USBPrinter,
  NetPrinter,
  BLEPrinter,
} from "react-native-thermal-receipt-printer";

USBPrinter.printText("sample text");
USBPrinter.printBill("sample bill");

Example

USBPrinter (only support android)

interface IUSBPrinter {
  device_name: string;
  vendor_id: number;
  product_id: number;
}
…

BLEPrinter

interface IBLEPrinter {
  device_name: string;
  inner_mac_address: string;
}
…

NetPrinter

interface INetPrinter {
  device_name: string;
  host: string;
  port: number;
}

Note: get list device for net printers is support scanning in local ip but not recommended

…

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Java

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言