Socket
Socket
Sign inDemoInstall

react-native-citizen-escposprinter

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
20
decreased by-13.04%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-citizen-escposprinter

A React Native wrapper for the Citizen ECSPOSPrinter SDK.

This supports both the old architecture and new architecture, Android and iOS.

Installation

npm install react-native-citizen-escposprinter

Usage

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

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

const main = async () => {
  const printers: CitizenPrinerInfo = 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();
};

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

Last updated on 27 Jan 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc