@amiminn/print-thermal
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

@amiminn/print-thermal

Print thermal library

Installation

Capacitor print-thermal dengan library dukungan dari @kduma-autoid/capacitor-bluetooth-printer

npm i @amiminn/print-thermal

example

import { BluetoothPrinter } from "@kduma-autoid/capacitor-bluetooth-printer";
import {
  dotPrint,
  enterLine,
  sLine,
  dLine,
  QRCode,
  textCenter,
} from "@amiminn/print-thermal";

function contextPrint() {
  let text = "";
  text += dotPrint();
  text += enterLine();
  text += sLine();
  text += textCenter("thermalPrint @amiminn");
  text += dLine();
  text += enterLine();
  text += QRCode({ text: "https://amiminn.my.id" });
  text += enterLine();
  text += textCenter("React, Typescript, Capacitor");
  return text;
}

const printerCommands = contextPrint();

await BluetoothPrinter.print({
  data: printerCommands,
});

output

alt text

Readme

Keywords

Package Sidebar

Install

npm i @amiminn/print-thermal

Weekly Downloads

7

Version

1.0.6

License

ISC

Unpacked Size

102 kB

Total Files

7

Last publish

Collaborators

  • amiminn