This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It is up to you. First, decide what is printer-unfriendly about how your current page looks. Next, make a new design that looks better on the printer. Write a new JSP to produce that design and provide a link to that JSP. (And finally, throw away the original JSP and just use the new and improved one.)
The only time I have seen "printer-friendly" on web pages is where the normal version is text (like a magazine article) divided into several linked pages covered with advertising and the printer-friendly version has all the text on a single page. Does that describe your situation?
It's also possible to use CSS in such a way that irrelevant parts of your JSP's output, like a column of links or "delete" checkboxes for example, do not appear in printed versions of the output.
Thanks....I will try writing a new JSP......I have to remove the header and some gif's from my original JSP, also the sortable links in the tables for my printer friendly version. I am not sure how to use style sheets for that.....!!!
Originally posted by Srini Nivas: Thanks....I will try writing a new JSP......I have to remove the header and some gif's from my original JSP, also the sortable links in the tables for my printer friendly version. I am not sure how to use style sheets for that.....!!!
If that's all you want to do then I think you should definitely use the CSS method. If your HTML is littered with <font> tags and other layout controls, then you should really rewrite it to use CSS anyway. Here's the piece of my CSS that controls the print format:This says that elements like <TH class="links"> etc. will not appear in printed versions of the page. But follow the link that Satou provided (and links from that page as well) for details.
Joined: Aug 25, 2005
I didnt quite get it! Can u give me some sample code???