【问题标题】:PrintArea Jquery Plugin only prints what is visible in the divPrintArea Jquery 插件仅打印 div 中可见的内容
【发布时间】:2014-03-13 18:15:52
【问题描述】:

我正在使用 jquery.printArea.js 来打印 div 的内容。模式选项设置为“iFrame”。 div 设置了overflow-y,以便用户可以垂直滚动。当我将打印区域设置为 div 并打印时,它不会打印 div 中的所有内容。它只打印屏幕上显示的内容。如何让插件打印全部内容?

【问题讨论】:

    标签: jquery jquery-plugins printing


    【解决方案1】:

    你能试试你的div吗

    <div style="overflow: overflow-y; height:..." class="expand-div">
    ....
    </div>
    

    在css中

    @media print {        
       .expand-div{
            overflow: visible !important;
            height: auto !important;
       }
    }
    

    这应该做的工作!

    【讨论】:

      【解决方案2】:

      对我来说效果很好!
      我最初使用 CSS 来限制 DIV 的高度,然后是 Silvio N 的答案中的代码:

      #dvDetalle {
          height: 100px;
          max-height: 300px;
          overflow: auto;
      }
      

      【讨论】:

        猜你喜欢
        • 2022-01-03
        • 1970-01-01
        • 2016-02-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多