项目作者: vshjxyz

项目描述 :
Phonegap adapter to allow raw printing from Javascript to a Star thermal printer via Bluetooth
高级语言: Java
项目地址: git://github.com/vshjxyz/StarIOAdapter.git
创建时间: 2013-11-19T15:59:11Z
项目社区:https://github.com/vshjxyz/StarIOAdapter

开源协议:MIT License

下载


StarIOAdapter

Just a phonegap adapter to allow raw printing from Javascript to a Star thermal printer via Bluetooth.

Use the standard phonegap/cordova way to install it.

phonegap local plugin add https://github.com/vshjxyz/StarIOAdapter

To use the plugin calling one of the methods in the StarIOAdapter object that you should find in your JS environment once you have installed the plugin.

Examples

  1. // This will search the first paired BT device and send the text
  2. // specified to it using the Star SDK
  3. StarIOAdapter.rawprint("Text to print", "BT:", function() {
  4. alert("printed");
  5. });
  1. // This method checks if the printer that has that particular IP is
  2. // Online and ready to print
  3. StarIOAdapter.check("TCP:192.168.1.200", function() {
  4. alert("The printer is Online and ready");
  5. }, function(error) {
  6. alert("The was a problem with the printer: " + error);
  7. });