0.0.21 • Published 2 years ago
capacitor-printer v0.0.21
capacitor-printer
Use ionic framework capacitor in mobiIot to print receipt
Install
npm install capacitor-printer
npx cap sync
Usage
import { MobiPrint } from 'capacitor-printer';
export class PrintPage {
constructor() {}
async printClicked(){
var payload= {
"company":"COMPANY X",
"address":"P.O.BOX-XXX-XXXXX,NAKURU",
"email":"XXX-XXXXX@XXX.COM",
"contact":"020-2336234/24732472364",
"other_info":"PIN : XXXXXXXXXX",
"cashier":"XXXXX XXXX",
"total_items":"1",
"sub_total":"340",
"vat":"20",
"total":"360",
"qrcode_link":"http://www.google.com",
"tax_perc":"18%",
"datetime":"10:30 PM JAN 04 2023",
"items":[
{
"name":"item x",
"quantity":"1",
"price":"1000.50",
"amount":"1000.50"
}],
"payments":[
{"name":"CASH","amount":"1000.50","currency":"KSH"}
]
};
var payload_str=JSON.stringify(payload);
const result = await MobiPrint.printReceipt({value:payload_str});
}
}
printReceipt(...)
printReceipt(options: { value: string; }) => Promise<{ value: string; }>
Param | Type |
---|---|
options | { value: string; } |
Returns: Promise<{ value: string; }>
0.0.21
2 years ago
0.0.20
2 years ago
0.0.19
2 years ago
0.0.18
2 years ago
0.0.17
2 years ago
0.0.16
2 years ago
0.0.15
2 years ago
0.0.14
2 years ago
0.0.13
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago