I am building a Cordova app which should allow us to print from mobile.
I am following this plugin
I have added the print code directly at device-ready, So on device ready I am allowed to select save as pdf and to search for printer, Till here every thing is working good my code in app.js
var printer = angular.module('starter', ['ionic','ngCordova'])
printer.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
cordova.plugins.printer.isAvailable(
//Check whether the printer is available or not.
function (isAvailable) {
//Enter the page location.
alert("printer is available")
var page = location.href;
cordova.plugins.printer.print(page, 'Document.html', function () {
alert('printing finished or canceled')
});
}
);
So above code open the dialog to select printer here and even alerts the message that printer is available.
The main issue is when I select search printers, it continuously searches the printer but no reply till 15 minutes, there is no time-out there.I have a wifi printer connected through LAN.
I am just wondering that is there any specific settings on printers to print from android?
Any kind of suggestion and help will be appreciated.