HeligPfleigh / react-native-thermal-receipt-printer

A RN library for thermal printer
163 stars 103 forks source link

Add support for custom tag #61

Open bambang-ap opened 3 years ago

bambang-ap commented 3 years ago

Summary 💡

Hi, can you provide to add custom tag? I have code like this

var o_start_bytes = new Buffer([27,33,16]);
var o_end_bytes = new Buffer([]);

and the controller

var controller = {
    ...
    "<O>": o_start_bytes,
    "</O>": o_end_bytes
}

I have added these code into the library, but sometimes it's reverted so, i have to edit library again and again.

Examples 🌈

I think it's can be better if i can do like this

await BLEPrinter.init({
   controllers: {
      "<O>": [27, 33, 16],
      "</O>": [],
   }
})