Javascript 如何使用primefaces在同一张纸上打印整个网页和iFrame

Javascript 如何使用primefaces在同一张纸上打印整个网页和iFrame,javascript,jquery,jsf,primefaces,jqprint,Javascript,Jquery,Jsf,Primefaces,Jqprint,在使用primefaces的大型web门户上工作时,门户单页由两部分组成 - PART I - the page layout - header - sidebar - footer - PART II - the main content in iframe 使用“打印”时,请使用以下代码打印此页面: 按钮 目标打印 问题 1-primeface打印机(jqprint)无法在同一纸张页面中打印版面页面和iframe,请在单独的页面中打印 2-如果页面内容丰富,则仅打印一页

在使用primefaces的大型web门户上工作时,门户单页由两部分组成

- PART I - the page layout
  - header
  - sidebar
  - footer
- PART II - the main content in iframe
使用“打印”时,请使用以下代码打印此页面:

按钮

目标打印

问题 1-primeface打印机(jqprint)无法在同一纸张页面中打印版面页面和iframe,请在单独的页面中打印

2-如果页面内容丰富,则仅打印一页



请帮助,使用primefaces或普通html/css/js重新标记,primefaces没有自己的打印机制,它只包括jqprint,提供primefaces版本
<p:printer target="printable" />
<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>