JSF printer friendly version of data table
I have a data table whose column can increase dynamically... it can increas开发者_运维技巧e up to 20 columns. What is the best way to show the printer friendly version of the table. Should I use Jasper reports. If yes, Jasper reports expects a xml file as source, so how to generate the XML file from the JSP page.
Just supply a CSS file which is read by printers only by specifying media="print"
.
<link rel="stylesheet" href="print.css" media="print" />
Therein you can just use CSS to set the page orientation (landscape), decrease the font size, decrease margin/padding, hide/show specific columns/cells, or even hide the entire table and show another one.
精彩评论