1

working on a huge web portal using primefaces, the portal single page is consist of 2 parts

- PART I - the page layout
  - header
  - sidebar
  - footer
- PART II - the main content in iframe

when i'm using print this page using following code:

button

<p:printer target="printable" />

target print

<h:panelGroup id="printable">
    <div class="pageTitle">
        <h:outputText value="#{main.moduleName}" rendered="false" />
    </div>

    <div class="userData">
        <h:outputLabel id="prtalTimeStamp" value="#{main.timeStamp}"
           rendered="false" />

        <h:outputLabel value="#{main.userIdLabel}" rendered="false" />
    </div>

    <div class="iframeDiv" id="content">
        <iframe src="#{main.currentFunctionUrl}" width="100%" id="ifr"
                    frameborder="0" height="100%" onload="disableContextMenu();" onMyLoad="disableContextMenu();" scrollbar='no' marginwidth='0' marginheight='0' hspace='0' align='middle'></iframe>
    </div>
</h:panelGroup>

The problem

1- the primeface printer (jqprint) cannot print layout page and iframe in same paper page , print in a separate pages.

2- if the page full of content, its only print one page.


please help, using primefaces or normal html/css/js

Danubian Sailor
  • 1
  • 38
  • 145
  • 223
maherelghali
  • 323
  • 1
  • 3
  • 4

0 Answers0