using p:printer

UI Components for JSF
Post Reply
bittersour
Posts: 61
Joined: 26 Aug 2013, 03:39

26 Sep 2013, 07:07

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>
-----------------------------------------------------------------------------------------------------------
Primefaces 5.1
MyFaces 2.0
WebSphere 8.0

kukeltje
Expert Member
Posts: 9608
Joined: 17 Jun 2010, 13:34
Location: Netherlands

26 Sep 2013, 07:41

Screenshots? It's hard to guess what might cause this... Might be custom css that is used

bittersour
Posts: 61
Joined: 26 Aug 2013, 03:39

26 Sep 2013, 09:46

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
-----------------------------------------------------------------------------------------------------------
Primefaces 5.1
MyFaces 2.0
WebSphere 8.0

kukeltje
Expert Member
Posts: 9608
Joined: 17 Jun 2010, 13:34
Location: Netherlands

26 Sep 2013, 10:20

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.

bittersour
Posts: 61
Joined: 26 Aug 2013, 03:39

26 Sep 2013, 10:27

Hi,

BTW, IE can't use the same css as Firefox and Chrome?
Can p:printer use a print.css?
-----------------------------------------------------------------------------------------------------------
Primefaces 5.1
MyFaces 2.0
WebSphere 8.0

kukeltje
Expert Member
Posts: 9608
Joined: 17 Jun 2010, 13:34
Location: Netherlands

26 Sep 2013, 10:42

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.

bittersour
Posts: 61
Joined: 26 Aug 2013, 03:39

01 Oct 2013, 05:09

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
-----------------------------------------------------------------------------------------------------------
Primefaces 5.1
MyFaces 2.0
WebSphere 8.0

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 15 guests