Mac Cruz
asked on
Pos Printing arrangement of an item
Hi experts,
I want to arrange my customer's receipt base on the code below. This code is working but there's no good arrangement of an
item. I wish to have a result like this; Any help please..
Qty Price Amount
1.25 10.00 12.50
120.00 1.75.00 210.00
12,000.00 1.75.00 21,000.00
Js
I want to arrange my customer's receipt base on the code below. This code is working but there's no good arrangement of an
item. I wish to have a result like this; Any help please..
Qty Price Amount
1.25 10.00 12.50
120.00 1.75.00 210.00
12,000.00 1.75.00 21,000.00
Js
function ePrint(){
const {PosPrinter} = require('electron').remote.require("electron-pos-printer");
const print_data = [
{type: 'text', value: 'Sample store', style: 'text-align:center;font-size:19px;'},
{type: 'text', value: 'Qty' + 'Price' + 'Amount', style: 'text-align:center;font-size:14px;'},
{type: 'text', value: '1.25' + '10.00' + '12.50', style: 'text-align:center;font-size:14px;'},
{type: 'text', value: '120.00' + '1.75' + '210.00', style: 'text-align:center;font-size:14px;'},
{type: 'text', value: '12,000.00' + '1.75' + '21000.00', style: 'text-align:center;font-size:14px;'},
];
PosPrinter.print(print_data, {
//printerName: 'EPSON TM-T88IV Receipt',
printerName: 'EPSON TM-U220 Receipt',
preview: false,
width: '100%',
margin: '0 0 0 0',
copies: 1,
})
.then(() => {
//Do something here..
})
.catch((error) => {
console.error(error);
});
}
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.