I'v read that the WebView in Android is a simple browser based on webkit and I was thinking that calling window.print() from my html document will be handled by this "mini-browser". But no. After reading many things on that subject, it seems that it's only possible to call a print function from the android app, and not from the html document, and this parti is poorly documented.
Has anyone experienced this before ?
Thanks.
Thanks, @martync! Reposting my comment as an answer, as it has turned out to actually answer the question.
The documentation explicitly says "You cannot use JavaScript in a HTML document to trigger printing", and provides an example of how to use the Java API. Chrome for Android (at least Beta) supports window.print()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With