views:

291

answers:

1

Every browser has print preview command in their File menu I want to make "print" button on HTML page and upon clicking i want to open print preview page. is this possible?

With this we can open print options <a href="javascript:window.print()">Print this page</a>

but can we open print-preview page instead print options ?

+1  A: 

window.print() is the only print-related function in window.

However, if you have defined a dedicated css-file for print, you can create a page that simulates a print-preview by only using the print stylesheet. And then open this in a popup or new window.

Morningcoffee
ok morning coffe
metal-gear-solid