Alignment Problem
ertugrulkutluer opened this issue · comments
Hi,
I am creating a design using the receiverline designer. However, alignment does not work properly. I am using Epson tm-t88vi thermal printer. I'm using "escpos" command.
This is my design.
`^^^^^^^^100
|"SHOP-NAME"|
|SHOP-ADDRESS-SHOULD-BE-HERE|
|SHOP-CITY|
|SHOP-COUNTRY|
|"ID | ORDER-ID|
|"DATE | ORDER-DATE|
|"TABLE | ORDER-TABLE|
|"SERVER | ORDER-SERVER|
|"TYPE | ORDER-TYPE|
|"CUSTOMER
|CUSTOMER-NAME
|X |NAME | AMOUNT|
|1 |Gazpacho (Medium Portion) | 15.65|
|"Notes
|The quick brown fox jumps over the lazy dog.
|SUBTOTAL | 30.50|
|TAX | 2.50|
|TOTAL | 33.00|`
and this is the result.
note: also divider not working properly. If I use the receiptline's own divider, emoji-like characters appear in the line.
Hello!
I tried with TM-T88V and this problem did not occur.
Is the encoding of the writable stream 'binary'
?
If it is not 'binary'
, this may happen.
const escpos = receiptline.transform(receiptmd, { command: 'escpos', cpl: 40 });
const socket = net.connect(port, host);
socket.write(escpos, 'binary');
const escpos = receiptline.transform(receiptmd, { command: 'escpos', cpl: 40 });
const serialport = new SerialPort({ path: 'com1', baudRate: 9600 });
serialport.write(escpos, 'binary');
Thanks!
thank you for reply!