mazenrashed / Printooth

A well documented, high-level Android interface that makes printing via bluetooth printers easier
Mozilla Public License 2.0
399 stars 113 forks source link

How to use Printooth.setPrinter #52

Open FelixVincent99 opened 4 years ago

FelixVincent99 commented 4 years ago

Basically, i wanted to use more than one printer. isit possible? and how do i determine which printer is paired to the Printooth. I couldn't find any documentation out there that are saving printer name, if any, can you provide one. Thanks

RaRoPe commented 3 years ago

Yes, this is possible, @FelixVincent99. You can use this code to get what you want:

var printer1 = PairedPrinter(name, address)  
var printer2 = PairedPrinter(name, address)  
Printooth.printer(printer1).print(printables)  
Printooth.printer(printer2).print(printables)

You can use Printooth.getPairedPrinter() to get the actual printer =D