Reputation: 673
When I try to print in Chrome browser, it shows up the print preview panel to user.
I want to open the system print dialog in chrome instead of the print preview panel.
Is this possible with JavaScript?
Actually I want to override CTRL+P
with CTRL+SHIFT+P
in JavaScript.
Some code example will be very much appreciated.
Upvotes: 2
Views: 3857
Reputation: 7694
This answer is really simple:
1.You can't
Print dialogs are not scriptable using JavaScript. They're proprietary parts of browsers themselves.
2. And absolutely don't think about doing this!
It is not your choice, its not your client.
It has nothing to do with your website.
Let users choose for themself
They will press ctrl+shift+P
when they want to use system print dialog.
People can disable chrome print view by typing about:flags
into the address bar and disable Print Preview.
Upvotes: 4