How do I open a preview page when clicking on a hyperlink?

Each browser has a preview command in the File menu. I want to make a Print button on the HTML page and after clicking I want to open the preview page. is it possible?

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

but is it possible to open the print preview page instead of print options?

+2


source to share


2 answers


window.print()

is the only print-related function in window .



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

+3


source


No, you cannot. However, there is a way to show that in IE using ActiveX and some others for other browsers ...



0


source







All Articles