PHP代码打印模型窗口打印滚动条


PHP Code To Print Model window printing scroll bar as well

我正在使用PHP Bootstrap,并试图打印模型窗口,我的问题是它是与滚动条和跳过滚动条背后隐藏的内容打印,我需要打印整个内容,无论滚动条出现与否。如果我有多页要打印,这是可以的。

请参考这些截图,

这是我的模型窗口内容滚动条隐藏一些内容

我在打印预览中得到的是这个

我只是想打印整个内容可能在多个页面上,但没有滚动条,

从模型窗口删除滚动条选项在某些情况下会使它很长,所以这不是一个选项。

从modal-body中删除overflow属性,并对要在其上创建滚动条的div应用overflow-y样式如:

.my-custom-scrollbar {
position: relative;
height: 180px;
overflow-y: auto;
}
.my-table{
display:table;
width: 100%;
}
th,td,tr{
padding: 5px;
border:2px solid;
}
<div class="my-custom-scrollbar">
  <table class="my-table">
    <thead>
      <tr>
        <th scope="col">#</th>
        <th scope="col">First</th>
        <th scope="col">Last</th>
        <th scope="col">Handle</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <th scope="row">1</th>
        <td>Mark</td>
        <td>Otto</td>
        <td>@mdo</td>
      </tr>
      <tr>
        <th scope="row">2</th>
        <td>Jacob</td>
        <td>Thornton</td>
        <td>@fat</td>
      </tr>
      <tr>
        <th scope="row">3</th>
        <td>Larry</td>
        <td>the Bird</td>
        <td>@twitter</td>
      </tr>
      <tr>
        <th scope="row">4</th>
        <td>Mark</td>
        <td>Otto</td>
        <td>@mdo</td>
      </tr>
      <tr>
        <th scope="row">5</th>
        <td>Jacob</td>
        <td>Thornton</td>
        <td>@fat</td>
      </tr>
      <tr>
        <th scope="row">6</th>
        <td>Larry</td>
        <td>the Bird</td>
        <td>@twitter</td>
      </tr>
    </tbody>
  </table>
</div>

祝你今天愉快!:)谢谢!