Hello,
Thank you for your reply! No I haven’t tried using buffer. Is this just a ESC/POS buffer command that I should add in my input string? Currently my string is
var finalReceipt = “Welcome to” + ‘\x20’ + companyName + ‘\x0a’ + “Date:” + ‘\x20’ + this.datetime
+ ‘\x0a’ + “Cashier:” + ‘\x20’ + cashierName + ‘\x0a’ + ‘\x0a’ + receiptItems + ‘\x0a’ + “Subtotal:” + ‘\x20’ + “$” + this.totalPayment + ‘\x0a’
+ “GST:” + ‘\x20’ + “$” + gst + ‘\x0a’ + “Service Charge:” + ‘\x20’ + “$” + svc + ‘\x0a’
+ “Total:”+ ‘\x20’ + “$” + val + ‘\x0a’ + “Amount Received:” + ‘\x20’ + “$” + this.amountReceived + ‘\x0a’ + “Change:”
+ ‘\x20’ + “$” + this.change + ‘\x0a’ + “Payment Type:” + ‘\x20’ + this.paymentType + ‘\x0a’ + footer + ‘\x0a’+ ‘\x0a’
receiptItems in the string is my array of items that I wish to print and the command to clear buffer is ‘\x1b\x40’ so do you suggest I place it in front of receiptItems like ‘\x1b\x40’+receiptItems… to clear the buffer first before I store in the items I wish to print?
Hope to hear from you soon,
Thank you