0.0.21 • Published 1 year 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
1 year ago
0.0.20
1 year ago
0.0.19
1 year ago
0.0.18
1 year ago
0.0.17
1 year ago
0.0.16
1 year ago
0.0.15
1 year ago
0.0.14
1 year ago
0.0.13
1 year ago
0.0.12
1 year ago
0.0.11
1 year ago
0.0.10
1 year ago
0.0.9
1 year ago
0.0.8
1 year ago
0.0.7
1 year ago
0.0.6
1 year ago
0.0.5
1 year ago
0.0.4
1 year ago
0.0.3
1 year ago
0.0.2
1 year ago
0.0.1
1 year ago