Window print method does not work in ipad chrome browser

I have the following code:

<input type="button" value="Print" onclick="window.print(); return false;"> 

Works in all browsers, but does nothing (without opening the print dialog) in ipad chrome browser.

How can I solve this problem?

However, if I manually print with the chrome settings, then its work.

+8
javascript google-chrome printing ipad
source share
3 answers

A few questions about SO show ( 1 , 2 , 3 ) that it is currently not possible to print in Chrome for iOS due to Apple policy when using alternative browser mechanisms.

Another solution is to use a third-party print service: http://www.printfriendly.com

+2
source share

This is a bug / feature of chrome. window.print is available, it works and does nothing. Try code :

 try { window.print() }catch(e) {alert(e.message)} 

A warning will not be displayed. Also the UIWebView class can use the UIKit Printing API

PS Chrome using UIWebView .

+1
source share

Try the following:

 function goPrint(){ window.print(); if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { window.location.reload(); } } 
+1
source share

All Articles