knyga / html2thermal

JavaScript library to translate subset of HTML into commands which can be executed on the thermal printer.
MIT License
43 stars 2 forks source link

very nice !! just want to know how to print in arabic letters? #1

Closed lilian131 closed 4 years ago

knyga commented 4 years ago

Sorry for the long reply. Missed the message. Repository is based on the https://github.com/knyga/node-thermal-printer At the initialization step you can set characterSet property. For example.

characterSet: PrinterCharSets.EPSON.ARABIA,  
// Buffer.from([0x1b, 0x52, 0x11])

And it should work. See the full list of charsets (epson and start have different chartset codes): https://github.com/knyga/node-thermal-printer/blob/master/lib/types/epson-config.js https://github.com/knyga/node-thermal-printer/blob/master/lib/types/star-config.js