Click here to Skip to main content
15,947,958 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

My application is developed in
In one of my pages(productinfo.aspx) I have a HTML button named & labelled
as "print". I am handling the click of this button in java script like


The above is **working fine** in all browsers on PC and in smartphones as well
**except Google Nexus mobiles and tablets**. It is working in other android
mobiles like Samsung and Sony experia etc..

I came to know that window.print is not supported in Google android and I
should use Google cloud print based on the following link.

But this requires the user to be logged into to GCP with their Google ID.
But my requirement is like the device will be not connected to Internet
and it should provide the print dialog as like in other devices.

In Android chrome browsers there is a print command in the browsers menu
clicking on the click of that is showing the print dialog without any problem.

Is it possible to invoke the browsers menu command through java script,
I tired simulating (Ctrl+p) key press event on the button click assuming
that it will trigger the browser's print command it too didn't work.

It would be very much helpful if any one can help me with a solution for
this issue.

**Thank You,

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900