Lakshmi Posted January 25, 2007 Share Posted January 25, 2007 HiHow can i show the print preview of the web page.is there any script like window.print ?Please help any one.ThanksLakshmi. Link to comment Share on other sites More sharing options...
MrAdam Posted January 25, 2007 Share Posted January 25, 2007 window.print() should print the current page .. Link to comment Share on other sites More sharing options...
jesh Posted January 25, 2007 Share Posted January 25, 2007 window.print() will act the same as if the user had clicked the print button in their browser. There isn't, as far as I am aware, any way to display the print preview window that appears as part of the browser.If you use a css file for print: <link rel="stylesheet" type="text/css" media="print" href="print.css" /> You could then build a second page which uses that stylesheet (with media="all") to render the page and the users would be able to see what the page would look like when it was printed. Margins and paper settings will, however, differ on different browsers. Link to comment Share on other sites More sharing options...
MrAdam Posted January 25, 2007 Share Posted January 25, 2007 check this Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now