Search code examples
iosprintingthermal-printer

Star Micronics iOS Sdk, can't print on background thread


I wanna know if anyone managed to print raster graphics to Star Micronics thermal printers using the StarIO sdk on a background thread? I tried to do that and the printer just won't print.

This is quite annoying because each time I try to print something to the printer, the entire app will just freeze until the operation is done, usually on a LAN connected printer it won't be that noticable, but on a bluetooth thermal printer it's unacceptable.

Thanks


Solution

  • Take a look at https://github.com/opentable/star-printing for an example of using NSBlockOperation and an NSOperationQueue to run your print jobs on a background thread. They also have a great wrapper around the StarIO framework that is much easier to use.