-
-
Notifications
You must be signed in to change notification settings - Fork 445
Closed
Description
Hi, I'm trying to have my text not be so close to the edges of my receipt, but it does not seem to be working. Here is the code I am running
const escpos = require('escpos');
const device = new escpos.USB();
const printer = new escpos.Printer(device);
function printItems(items){
device.open(function(){
printer.font('a')
.style('NORMAL')
.size(1,1);
items.forEach(function(item) {
printer.align("LT")
.marginLeft('8')
.marginRight('8')
.marginBottom('8')
.print(item["name"])
.control("HT")
.println(parseFloat(item["price"]));
});
});
}
var items = [
{"name": "hotdog",
"price" : 2.01}
];
printItems(items);
device.open(function(){
printer.cut();
printer.close();
});
When the receipt prints, the text is right up against the left and bottom edges (the text is not long enough to reach the right edge).
KakarN
Metadata
Metadata
Assignees
Labels
No labels