capacitor-plugin-print-bluetooth
v0.0.6
Published
This plugin was created with the purpose of being able to print invoices using the mobile device
Downloads
2
Readme
capacitor-plugin-print-bluetooth
Printer Blueetooth
Install
npm install capacitor-plugin-print-bluetooth
npx cap sync
How to Use
**The printer must be connected to the device via Bluetooth **
you must import the library where you want:
import { PrintBluetooth } from 'capacitor-plugin-print-bluetooth'
Definitions
"\n it's a line break"
"[L] It is used to position the text to the left"
"[C] It is used to position the text in the center"
"[R] Used to position the text to the right"
Example
let textToPrint= "[L]\n" +
"[L] <b>bold text</b>\n\n" +
"[C] <b>I am a text in the center</b>\n" +
"[R] I am a text to the right\n" +
"[L] I am a text to the left\n" +
"[L] <b>inserting text</b>\n" ,
let dataPrinter = textToPrint;
" Information is sent to the printer"
PrintBluetooth.blPrint({ value: dataPrinter });
API
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: Promise<{ value: string; }>
blPrint(...)
blPrint(options: { value: string; }) => boolean
| Param | Type |
| ------------- | ------------------------------- |
| options
| { value: string; } |
Returns: boolean
testingMessage()
testingMessage() => boolean
Returns: boolean
getNotifications()
getNotifications() => any
Returns: any