# cordova-plugin-btprinter

> Cordova/Phonegap driver for bluetooth printers

Latest version **1.0.9** (published 2021-06-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-btprinter
pnpm add cordova-plugin-btprinter
yarn add cordova-plugin-btprinter
bun add cordova-plugin-btprinter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2021-06-04 |
| First published | 2021-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 339.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Kevin Barrios |
| Maintainers | kevbarrios |
| Keywords | cordova, zebra, printer, bluetooth, print, android, install, ecosystem:cordova, cordova-android, btprinter, image, zpl |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-btprinter
- Repository: https://github.com/kevbarrios/cordova-plugin-btprinter
- Homepage: https://github.com/kevbarrios/cordova-plugin-btprinter#readme
- Issues: https://github.com/kevbarrios/cordova-plugin-btprinter/issues
- npm.io page: https://npm.io/package/cordova-plugin-btprinter

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.9 (latest) — 2021-06-04
- 1.0.8 — 2021-06-04
- 1.0.7 — 2021-06-04
- 1.0.6 — 2021-06-04
- 1.0.5 — 2021-06-04

## README

# cordova-plugin-btprinter
A Cordova driver for printers

Plugin based of: https://github.com/michael79bxl/zbtprinter

Example:

List Linked Devices:
```
window.cordova.plugins.btprinter.find(
  (data) => {
    alert(JSON.stringify(data)); 
    console.log(data);
  },
  (fail) => {
    alert(fail);
  }
);
```

Printer ZPL:
```
cordova.plugins.btprinter.printZPL("AC:3F:A4:52:73:C4","^XA^FO10,10^AFN,26,13^FDHello, World!^FS^XZ",
    (success) => { 
        console.log("Print ZPL ok"); 
    }, function(fail) => { 
        console.log(fail); 
    }
);
```

Printer Text:
```
cordova.plugins.btprinter.printText("AC:3F:A4:52:73:C4","Hello, World!",
    (success) => { 
        console.log("Print Text ok"); 
    }, function(fail) => { 
        console.log(fail); 
    }
);
```

Printer Image:
```
cordova.plugins.btprinter.printText("AC:3F:A4:52:73:C4","data:image/jpg;base64, ....",
    (success) => { 
        console.log("Print Image ok"); 
    }, function(fail) => { 
        console.log(fail); 
    }
);
```

Install Cordova

```
cordova plugin add https://github.com/kevbarrios/cordova-plugin-btprinter.git

cordova plugin add cordova-plugin-btprinter
```

config.xml

```
<plugin name="com.kbarrios.btprinter" spec="cordova-plugin-btprinter@^1.0.7" />
```

ZPL - Zebra Programming Language
For more information about ZPL please see the  [PDF Official Manual](https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf)

---
_Source: https://npm.io/package/cordova-plugin-btprinter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
