Print HTML page in mobile browsers

4

I'm building a system that will work on the web in PHP, where I have to make some impressions of some vouchers. The system can print the pages in HTML when I am on the computer, when I am accessing the system by a Smartphone or tablet the print function does not work. The button appears, shows that it is clicked, but nothing happens. The command I'm using is this:

<a onclick="window.print()" class="btn btn-primary no-print">Imprimir</a>

My question is whether this print function is generic, or is there a specific one for mobile devices.

    
asked by anonymous 18.11.2015 / 16:05

1 answer

1

You can put it on your own href

<a href="javascript: window.print();" class="btn btn-primary no-print">Imprimir</a>

JSFIDDLE:

link

    
18.11.2015 / 16:37