Solved

Printing only part of the jsf primefaces page

Posted on 2014-01-15
2
2,666 Views
Last Modified: 2014-03-14
Hi,

I have a print button as below

  <p:commandButton id="printit" value="Print" type="button" icon="icn-print">
                    <p:printer target=":topForm:data" />
                </p:commandButton>

Open in new window


when i click print button only top half of the page is getting printed and bottom half is pushed to next page. How do i fix this issue.

please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
gudii9 earned 0 total points
ID: 39805204
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.


<p:commandButton id="printId" value="Print Me" type="button" icon="printicon">
<p:printer target=":mainForm:panelGridID1" />
</p:commandButton
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.

<p:commandButton id="printId" value="Print Me" type="button" icon="printicon">
<p:printer target=":mainForm:panelGridID1" />
<p:printer target=":mainForm:panelGridID2" />
</p:commandButton

can you please advise how to resolve this issue.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sql import cannot be resolved jsp 3 74
going to wrong jsp page 2 46
Notify sent to other threads in Java 9 41
DTD and JAVA versions 1 28
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question