I’m currently developing an app in ExtJs where I am supposed to take a PDF and print it to the label.
The PDF is just a regular label for warehouse stuff so it’s very basic. The app will be used by zebra smartphones and they’ll be connected to the printers through bluetooth signals.
Does anyone has ever used Zebra’s APIs? Currently trying to implement the BrowserPrint library but with no luck. At least the library gets loaded correctly..
this is the function I am currently working on:
onPrintClick() {
var selected_device;
var devices = [];
BrowserPrint.getDefaultDevice("printer", function(device) {
//Add device to list of devices and to html select element
selected_device = device;
devices.push(device);
Ext.Msg.alert(device.name ? device.name : 'Unknown Device');
//Discover any other devices available to the application
BrowserPrint.getLocalDevices(function(device_list) {
for(var i = 0; i < device_list.length; i++) {
var device = device_list[i];
if(!selected_device || device.uid != selected_device.uid) {
devices.push(device);
Ext.Msg.alert(device.name);
}
}
}, function(){alert("Error getting local devices")},"printer");
}, function(error){
alert(error);
});
}