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-bixolon-print

v1.0.18

Published

Cordova Bixolon plugin

Downloads

5

Readme

BixolonPrint Corodva Plugin

NPM version

Cross-platform BixolonPrint Plugin for Cordova / PhoneGap.

Supported Platforms

  • Android
  • iOS

Installation

Below are the methods for installing this plugin automatically using command line tools.

Using the Cordova CLI

$ cordova plugin add https://github.com/alfonsovinti/cordova-plugin-bixolon-print.git

Using the Phonegap CLI

$ phonegap local plugin add https://github.com/alfonsovinti/cordova-plugin-bixolon-print.git

Plugin Options

cordova.plugins.bixolonPrint.settings = {
  lineFeed: 3,
  formFeed: false,      // enable\disable jump to next position, in black marker and label modes
  autoConnect: true,    // Android only: if this is set to false displays a dialog box for selecting the printer
  toastMessage: true,   // Android only: show a printer message
  separator: '=',
  codePage: cordova.plugins.bixolonPrint.CodePage.CP_1252_LATIN1 // define code page, default value is set to CP_1252_LATIN1.
};

Available Code Page

CP_437_USA               : 0,
CP_KATAKANA              : 1,
CP_850_MULTILINGUAL      : 2,
CP_860_PORTUGUESE        : 3,
CP_863_CANADIAN_FRENCH   : 4,
CP_865_NORDIC            : 5,
CP_1252_LATIN1           : 16,
CP_866_CYRILLIC2         : 17,
CP_852_LATIN2            : 18,
CP_858_EURO              : 19,
CP_862_HEBREW_DOS_CODE   : 21, // Android only
CP_864_ARABIC            : 22,
CP_THAI42                : 23,
CP_1253_GREEK            : 24,
CP_1254_TURKISH          : 25,
CP_1257_BALTIC           : 26,
CP_FARSI                 : 27,
CP_1251_CYRILLIC         : 28,
CP_737_GREEK             : 29,
CP_775_BALTIC            : 30,
CP_THAI14                : 31,
CP_1255_HEBREW_NEW_CODE  : 33,
CP_THAI11                : 34, // Android only
CP_THAI18                : 35, // Android only
CP_855_CYRILLIC          : 36,
CP_857_TURKISH           : 37,
CP_928_GREEK             : 38,
CP_THAI16                : 39,
CP_1256_ARABIC           : 40,
CP_1258_VIETNAM          : 41, // Android only
CP_KHMER_CAMBODIA        : 42, // Android only
CP_1250_CZECH            : 43  // Android only

Using the plugin

The plugin creates the object cordova/plugin/BixolonPrint with following methods:

Add line to print

cordova.plugins.bixolonPrint.addLine({
    text       : String,    // text to print
    textAlign  : String,    // text align, default left
    textWidth  : int,       // text width, default 0
    textHeight : int,       // text height, default 0
    fontType   : String,    // font type, A or B
    fontStyle  : String     // font style, bold or underlined or reversed
});

Add line separator

cordova.plugins.bixolonPrint.addHr(separator String);

Print text lines

cordova.plugins.bixolonPrint.printText(successCallback, errorCallback, config Object);

Cut paper

cordova.plugins.bixolonPrint.cutPaper(successCallback, errorCallback, config Object);

Get printer status

cordova.plugins.bixolonPrint.getStatus(successCallback, errorCallback, printStatus Boolean);

Examples

Print a text

cordova.plugins.bixolonPrint.addLine("hello cordova!");
cordova.plugins.bixolonPrint.printText();

Print a custom text

// compose text
cordova.plugins.bixolonPrint.addLine({
    text: "hello cordova!"
    textAlign: cordova.plugins.bixolonPrint.TextAlign.CENTER,
    fontStyle: cordova.plugins.bixolonPrint.FontStyle.BOLD
});
cordova.plugins.bixolonPrint.addHr();
cordova.plugins.bixolonPrint.addLine("#@*èòçìàé€");
// finally print
cordova.plugins.bixolonPrint.printText(
    function (response) {
        alert("print success!")
    },
    function (error) {
        alert("print failure: " + error)
    },
    {
        codePage: cordova.plugins.bixolonPrint.CodePage.CP_1252_LATIN1
    }
);