Window Print Method Is Not Working In Ipad Chrome Browser
I have the following code: Which works in all browsers but it is doing nothing ( not opening prin
Solution 1:
Multiple questions on SO show (1, 2, 3) that it's currently not possible to print in Chrome for iOS due to Apple's policy on using alternative browser engines.
Another solution is to use a third-party printing service: http://www.printfriendly.com
Solution 2:
It's a chrome bug/feature. window.print
is available, it works and do nothing. Try this code
:
try {
window.print()
}catch(e) {alert(e.message)}
The alert will not be shown. Also class UIWebView
can use UIKit Printing API
P.S. Chrome usingUIWebView
.
Solution 3:
Try this:
function goPrint(){
window.print();
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1) {
window.location.reload();
}
}
Post a Comment for "Window Print Method Is Not Working In Ipad Chrome Browser"