auctifera-josed / starprnt

Cordova plugin for the Star micronics printers
MIT License
40 stars 39 forks source link

print() is not working #28

Open ThantZinOoCrystal opened 5 years ago

ThantZinOoCrystal commented 5 years ago

I'm trying to use print() fuction with PrintCommand in ionic1 project , i got "Success!" response but not printing and adding appendQrCode commands force close my app.I'm using TSP100 bluetooth printer.

daniellizik commented 5 years ago

@ThantZinOoCrystal TSP100iiiBI only supports printing raster images via StarGraphic emulation. So in that emulation you can only use .print('BT:TSP100', [{ appendRawBytes: [bitmap byte array] }])

ThantZinOoCrystal commented 5 years ago

@daniellizik ,thanks for your informations.I will try it.

daniellizik commented 5 years ago

@ThantZinOoCrystal i'm using imagemagick to make a bitmap from text. this is mostly working, but my tsp100iiiBI seems to fail if the byte array is too long. you might have to divide the image into several chunks and call starprnt.print with Promise.all, i am debugging this right now.