PrimeFaces, like all JSF tagsets, renders the actual page as HTML.
HTML is not a good medium for 100% faithful display (or printing) of content. The HTML client (browser) is permitted to do major re-arrangement of the content to accomodate the page to the users specific display.
You can provide greater control over positioning, scaling, and so forth using CSS tags, but for 100% printer fidelity, you would have to select a more rigorous output format, such as PDF.
Note that CSS has the ability to alter rendering based on what media you are outputting to. I use this feature to hide buttons and other things that are meaningless on a printed page.
i referred below link
http://www.primefaces.org/showcase/ui/printer.jsf I have two separate panel grids with different ids panelGridID1 and panelGridID2 which i need to print out.(which basically avoids header and left navigation menu but only prints these two panel grids alone)
When i gave as below with one panel grid id (panelGridID1 ) it worked perfect.
when i tried to give second panel grid id(panelGridID2) as well to print as below getting error as javax.faces.FacesException: Cannot find component :mainForm:panelGridid2 in view.