HeligPfleigh / react-native-thermal-receipt-printer

A RN library for thermal printer
157 stars 102 forks source link

reduce space between lines #82

Open Salem-Abderaouf opened 2 years ago

Salem-Abderaouf commented 2 years ago

hello ,

I have a bill to print and its looks like this form

USBPrinter.printBill("<C>Our Brand </C>");
USBPrinter.printBill("<C>Thanks to purchase</C>");
USBPrinter.printBill("<C>{ here we put the order }</C>");

but the white space between those line is big is there a way to reduce it ?

sultanularefin commented 2 years ago

try something like this:

await Printer.printBill(${design});

and const design defined in here: https://github.com/leesiongchan/react-native-esc-pos#usage

nzrin commented 2 years ago

How to reduce white space? Please help.....

montanhes commented 1 year ago

I was having this same problem with a lot of spaces between lines.

I solved by creating just one line using \n to breaking lines, something like this:

const text = "<C>centered line</C>\nSecond Line of text\nThird Line of text";
BLEPrinter.printText(text)