【问题标题】:Print License agreement in JSFJSF 中的打印许可协议
【发布时间】:2015-05-30 01:36:37
【问题描述】:

我正在使用 xhtml 在 JSF 中创建许可协议页面。里面有一个链接“打印许可协议”。其中,当用户点击打印许可协议时,许可将被导出为 pdf, 然后用户可以打印。你能告诉我我们是如何在 jsf 中做到这一点的吗?

【问题讨论】:

    标签: jsf printing xhtml


    【解决方案1】:

    使用以下 javascript 函数(多年前在 JSF 1.2 中)打印页面的 toPrint 部分:

    function printTandC() {
        if (isIE() == true){ 
            document.toPrint.focus(); 
            document.toPrint.print(); 
        } else { 
            window.frames['toPrint'].focus(); 
            window.frames['toPrint'].print();
        }
    }
    

    toPrint 在哪里

    <iframe src="../tandcprintable.seam" id="toPrint" name="toPrint" class="tandcprintable"/>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-04-18
      • 1970-01-01
      • 2018-12-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-10
      • 2021-10-02
      相关资源
      最近更新 更多