Print preview for jsp page

Discussions

General J2EE: Print preview for jsp page

  1. Print preview for jsp page (1 messages)

    hi in my project i want to generate print preview for my jsp page . if i clicks on hyper link print preview the form preview has to be displayed can any one help in this thanks in advance kiran
  2. Re: Print preview for jsp page[ Go to top ]

    Hi kiran kumar! You have two possibilities to do that. First: You link to an other JSP file, that displays the content in "print friendly" mode. Second: If you have a valid CSS site, you can simply set an other stylesheet, that is responsible for displaying the page in print mode (and popup the print dialog). In CSS you can set the type of paper, page offset, watermarks, you can hide page elements and so on. You must have three types of CSS: 1. the normal css 2. the print preview css (with the print button) 3. the print css (without the print button) 1. and 2. can be switched by JavaScript. 3. is defined as , so the browser uses this CSS for the print. I hope that it helps you :). Alex