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

cordova-plugin-flash-wintec-printer

v1.6.2

Published

A plugin for the FLASH Moova Touch 2, that gives Cordova access to the native printer SDK.

Downloads

92

Readme

This plugin was developed to access the printer of a Chinese manufactured device specifically for our company.

It uses files they gave us in the form of .so files, that we load with cordova using System.loadlibrary() or something. That in turn hits the com port and sends stuff to printer.

The printer sdk supports printing a bmp image, text, and multiple barcode styles. We also send data to the printer in the form of 32 characters at a time. The printer doesn't do any buffering of its own, and if we don't do this we get overflows on slips of about 4kb in size or more. I think this includes the size of the bitmap and stuff.

Anyway, load with cordova, send your shit to the new object on your window, bobs your onkel.

---- ALSO this is some useful comments:

/** ///////////////

  • arg0: Accepts a message, containing the string to print. We use ; as the CRLF character.
  • tells us to print the FLASH cow logo.
  • and around a valid barcode to print it.
  • Calls callbackContext.error() when fails and callbackContext.success() when succeeds. **/

// Map typeMap = new HashMap(); // typeMap.put("UPC_A", 0); // typeMap.put("UPC_E", 1); // typeMap.put("JAN13",2); // typeMap.put("JAN8", 3); // typeMap.put("CODE39", 4); // typeMap.put("ITF", 5); // typeMap.put("CODABAR", 6); // return typeMap; //612334!not a valid CODABAR barcode im lazy!5345345

exports.print = function(arg0, success, error) { exec(success, error, "FlashWintecPrinter", "print", [arg0]); };

/* /////////////////\

  • @logoPath: A path (excluding /mnt/ part) to the logo that we'll be using
  • @devicePath: The internal path to the printer (dev/ttySAC1 for instance)
  • returns: nothing. */ exports.initPrinter = function(arg0, arg1, success, error) { exec(success, error, "FlashWintecPrinter", "initPrinter", [arg0, arg1]) };