Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-citizen-escposprinter

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-citizen-escposprinter

A Turbo Module wrapper for the Citizen ESC POS Printer SDK.

  • 0.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

react-native-citizen-escposprinter

A React Native wrapper of the Citizen ECSPOSPrinter SDK, supporting the New Architecture and classic builds.

The current version embeds these SDKs:

  1. CSJAndroidPOSSDK_V212E.zip
  2. CSJiOSSwiftSDK_V212E.zip

Usage

Most of the methods are a simple wrapper of the native SDK. For a complete list of methods and their details, you may refer to the PDF manual inside the Citizen SDK.

import {
  connect,
  cutPaper,
  disconnect,
  ESCPOSConst,
  printText,
  searchCitizenPrinters,
} from "react-native-citizen-escposprinter";

const main = async () => {
  const printers = await searchCitizenPrinters(
    ESCPOSConst.CMP_PORT_WiFi,
  );
  console.info("Found printers:", printers);

  await connect(printers[0].ipAddress);
  await printText("Hello World!\n");
  await cutPaper(ESCPOSConst.CMP_CUT_FULL_PREFEED);
  await disconnect();
};

⚠️ Known Issues

Error RCTEvents.receiveEvent() is not registered

tl;dr Do not use index.tsx as your entrypoint, use something like app.tsx instead.

This error happens when all of the following conditions are met:

  1. You have expo-router installed
  2. You have new architecture enabled
  3. You are using index.tsx as your entrypoint

When expo-router's own modified entrypoint sees your index.tsx, it will be confused and incorrectly overrides some native modules.

Partial USB Support

USB connections without specified a serial number is supported and tested in the following environments (see #7):

  1. Android in "old" architecture
  2. Android in New Architecture

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

If you use this library at work, consider sponsoring for a first-class technical support.

Keywords

FAQs

Package last updated on 09 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc