Page 1 of 1

using p:printer

Posted: 26 Sep 2013, 07:07
by bittersour
Hi,

I am using p:printer to print out xhtml pages.

On IE 9 when I click the Print button, the print out is in a mess. For firefox and Chrome, the print out looks nicer.

Code: Select all

<p:commandButton value="Print" type="button" icon="ui-icon-print">  
        <p:printer target="form1" /></p:commandButton>

Re: using p:printer

Posted: 26 Sep 2013, 07:41
by kukeltje
Screenshots? It's hard to guess what might cause this... Might be custom css that is used

Re: using p:printer

Posted: 26 Sep 2013, 09:46
by bittersour
Hi,

Pls see attached links. Although it might not be so clear but still able to see the messy printout on IE 9 browser.

IE: https://s3-ap-southeast-1.amazonaws.com ... /w4/IE.pdf
Firefox: https://s3-ap-southeast-1.amazonaws.com ... irefox.pdf

Re: using p:printer

Posted: 26 Sep 2013, 10:20
by kukeltje
I think these are pure css issues that need to be fixed by you. PF cannot contain all possible css corrections for all possible css things you can apply.

Re: using p:printer

Posted: 26 Sep 2013, 10:27
by bittersour
Hi,

BTW, IE can't use the same css as Firefox and Chrome?
Can p:printer use a print.css?

Re: using p:printer

Posted: 26 Sep 2013, 10:42
by kukeltje
Most of the css will be identical for ie and others, and I'd expect a css with mediatype print can be used. Never tried it in this case though, give a quick try.

Re: using p:printer

Posted: 01 Oct 2013, 05:09
by bittersour
Hi,

Thanks for the advice. I did not using the p:printer. I added a print.css and print preview from browser working great now. :D