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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-epson-epos-printer

v0.0.14

Published

> React native module to handle Epson ePOS SDK (for now, only Android)

Downloads

392

Readme

react-native-epson-epos-printer

React native module to handle Epson ePOS SDK (for now, only Android)

npm version MIT License npm downloads install size npm version

🚀 Installation

Using npm:

npm i react-native-epson-epos-printer

📖 Documentation

Tags:

The printing order is sequential and will go according to the payload.

Implementation

import Printer from 'react-native-epson-epos-printer';
Printer.print(1, '50:57:9C:57:7B:M1', examplePayload)
                .then(console.log)
                .catch(console.log)

📋 Commands

| Key | Type | Description | |---|---|---| |image|url|link to download the image. Alternatively, the size tag can be used to indicate the size of the image, by default the size is 187| |line|number|specifies the number of lines to skip. You can also use the text tag with new lines.| |dotted|number|specifies the number of centered dotted lines. You can also use the centered tag with "------------------------------".| |centered|string|centered text.| |text|string|default text positioned to the left and add new line at the end. You can write a paragraph making line breaks with \n to avoid having to add several text tags.| |left|string|write the text to the left without adding a new line. Using new lines can cause unexpected problems, to use a new line better use the text tag.| |right|string|write the text to the right without adding a new line. left and right can be used in combination, when combined a new line will be added by default. Example:{ "left": "Celggar:", "right": "$33,024.01"}. | |barcode|string|print a barcode. default (BARCODE_CODE93). Barcode Types|

📋 Barcode types

| Barcode | Value | |---|---| |BARCODE_UPC_A|0| |BARCODE_UPC_E|1| |BARCODE_EAN13|2| |BARCODE_JAN13|3| |BARCODE_EAN8|4| |BARCODE_JAN8|5| |BARCODE_CODE39|6| |BARCODE_ITF|7| |BARCODE_CODABAR|8| |BARCODE_CODE93|9| |BARCODE_CODE128|10| |BARCODE_GS1_128|11| |BARCODE_GS1_DATABAR_OMNIDIRECTIONAL|12| |BARCODE_GS1_DATABAR_TRUNCATED|13| |BARCODE_GS1_DATABAR_LIMITED|14| |BARCODE_GS1_DATABAR_EXPANDED|15|

💻 Example Payload

[
  {
    "image": "https://github.githubassets.com/images/modules/logos_page/Octocat.png"
  },
  {
    "line": 1
  },
  {
    "centered": "Celggar Company"
  },
  {
    "centered": "RUC 777-136-113133  DV  02"
  },
  {
    "centered": "Capellanía"
  },
  {
    "centered": "Express line 236-5555"
  },
  {
    "line": 2
  },
  {
    "text": "RUC/CIP: C-8-330124"
  },
  {
    "text": "SOCIAL: TODD MULLINS - 8733212"
  },
  {
    "line": 2
  },
  {
    "text": "INVOICE: 0-00000002401\nDOCUMENTO ERP: ACM1PT\nSUCURSAL: Capellanía - Principal\nSELLER: Celggar WEB\n NAME: Celggar"
  },
  {
    "line": 3
  },
  {
    "centered": "FECHA: 11/09/2020    HORA: 8:47"
  },
  {
    "barcode": "0-0000039242",
    "type": 9
  },
  {
    "text": "COMMAND"
  },
  {
    "dotted": 2
  },
  {
    "text": "2.0 x $4.99"
  },
  {
    "text": "C000056297 Abono orgánico humus 40lb $9.98 1.0 x 10.99"
  },
  {
    "text": "C000056298 Rodillo para pintar $9.98 1.0 x 10.99"
  },
  {
    "text": "C000056299 Leche 40lb $9.98 1.0 x 10.99"
  },
  {
    "text": "C000007394 COSTO DE ENVÍO (ACARREO) $7.95"
  },
  {
    "left": "SUBTOTAL:",
    "right": "$109.10"
  },
  {
    "left": "DISCOUNT:",
    "right": "$0.0"
  },
  {
    "dotted": 1
  },
  {
    "left": "SUBTOTAL (again):",
    "right": "$109.10"
  },
  {
    "left": "EXEMPT:",
    "right": "$0.00"
  },
  {
    "left": "GRAVABLE:",
    "right": "$109.10"
  },
  {
    "left": "I.T.B.M.S (7%):",
    "right": "$5.38"
  },
  {
    "left": "TOTAL:",
    "right": "$114.48"
  },
  {
    "left": "PUNTOS C:",
    "right": "$7.83"
  },
  {
    "left": "CAMBIO:",
    "right": "$0"
  },
  {
    "dotted": 2
  },
  {
    "text": "DELIVERY ADDRESS"
  },
  {
    "dotted": 1
  },
  {
    "text": "Panamá, Coclé, Capellanía, Lex Luthor Tower, Apto ACM1PT 01A Calle Justice League - cerca de la cueva de Batman"
  },
  {
    "text": "COMMENTS: NO COMMENTS"
  },
  {
    "text": "EMAIL: [email protected]"
  },
  {
    "text": "PHONE: 236-5555"
  }
]