2.0.2 • Published 5 years ago

nativescript-sewoo-printer v2.0.2

Weekly downloads
7
License
Apache-2.0
Repository
github
Last release
5 years ago

NativeScript Sewoo Printer

npm version

This plugin integrate your nativescript app with Sewoo LK-P43Ⅱ printer to print a normal text or a bmp.

Prerequisites / Requirements

You have to pair your device via bluetooth with the printer before you test the plugin.

Installation

tns plugin add nativescript-sewoo-printer

Usage

First of all put these permissions in you AndroidManifest.xml file:

```
<uses-permission android:name="android.permission.BLUETOOTH" />
```
let printer = new SewooPrinter("windows-1256");
printer.printImg(bmp);
```

for more information see the demo

API

PropertyDefaultDescription
paperSizePaperSizes.FourInchset the default paper size for the printer
FunctionDescriptionParams
connect(address:string):voidconnect to a printer using its addressaddress:string ex: "00:13:7B:49:D3:1A"
disconnect():voiddisconnect from a printer
print(text: string): voidprint normal texttext : the text you want to print
printImg(bitmap: globalAndroid.graphics.Bitmap, startX?: number, startY?: number): void;disconnect from a printerbitmap: the image to print, startX:number specify the position on the paper to start print from on X axis default "0", startY:number specify the position on the paper to start print from on Y axis default "0"

License

Apache License Version 2.0, January 2004

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago