I have now managed to create an upload in jsf that allows the user to upload a txt file, I can also display what has been uploaded, what I need to know now is how can I print this text to a printer when a user presses a command button
Thanks
I have added create a new css file called print.css,
@media print {
#header, #footer, #menu, #title, #h1, #2, #main, #logo, #logo_text, #logo_colour, #site_content, #content{
display: none;
}
}
As these are the things I wish removed
My css for the whole document is:
<link rel="stylesheet" type="text/css" href="style.css" title="style" />
I have added:
<h:outputStylesheet type="text/css" name="print.css" media="print" />
above my button :
<button onclick="window.print()">Print</button>
but when I press this button I can still see all the css