onis-printer
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

onis-printer

bluetooth and native printer

Installation

npm install onis-printer or yarn add onis-printer

Usage

import {
  initPrinter,
  printText,
  connectBTPrinter,
  initBtPrinter,
  printNewLine,
  setBold,
  setAlign,
  setSmall,
  printLine,
  setLineSpacing,
  feedPaper,
  getPairedDevice,
} from 'onis-printer';

const result = await initPrinter();

await printText('text');

const result = await connectBTPrinter();

await initBtPrinter();

await printNewLine();

await setBold(true / false);

// 100 - center, 101 - right, 102 - left
await setAlign(100);

await setSmall(true / false);

await printLine();

await setLineSpacing(30);

await feedPaper();

const result = await getPairedDevice();

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with Adyasuren

Package Sidebar

Install

npm i onis-printer

Weekly Downloads

18

Version

0.2.1

License

MIT

Unpacked Size

2.98 MB

Total Files

340

Last publish

Collaborators

  • adyasuren