开发者

Print from Mobile safari web app

开发者 https://www.devze.com 2023-02-03 21:04 出处:网络
Mobile safari for ios4.2 allow printing 开发者_开发百科via air print. Is it possible to do the same via a web app using javascript i.e window.print(); ? I run my webapp using the follow meta tags.

Mobile safari for ios4.2 allow printing 开发者_开发百科via air print. Is it possible to do the same via a web app using javascript i.e window.print(); ? I run my webapp using the follow meta tags.

<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<meta name="apple-mobile-web-app-capable" content="yes" />


On a normal webpage, window.print(); will indeed invoke the printing dialog.

Unfortunately it seems that when a webpage is run in the fullscreen webapp mode, window.print(); has no effect (as of iOS 4.2.6). Obviously this could change in the future.


I can confirm that as of iOS 5.0 window.print(); now allows for printing via AirPrint.

0

精彩评论

暂无评论...
验证码 换一张
取 消