I just got this android device that has a thermal printer. It also comes with a SDK that has an external .jar
file that can be used to communicate with the device.
Now I am trying to print text from javascript to the device. In the samples they have given for java projects you can print using the following:
import com.nbbse.printer.Printer;
public static Printer print;
print = Printer.getInstance();
print.printText(“Printer testing!!!”);
print.printText(“Printer testing!!!”, 3);
print.printText(“Printer testing!!!”, true);
print.printText("Printer Testing!!!", 2, false);
How can I achieve the same in a cordova application?
I have started by adding the .jar
in the libs
folder and then including this line in the config.xml
:
<lib-file src="platforms/android/libs/MP3_Api_V0.6.jar"/>
How can I invoke the printing directly from a javascript?