1

我想通过使用 CSS 媒体打印缩小它们在一页中打印多页,例如 2(每个 50%)或 4(每个 25%)页面。我只能在打印时看到诸如更改页面设置之类的选项,但我不希望这样。任何人都可以提出一些建议。

http://a-pdf.com/faq/i/combine-defined-pdf-pages-into-one-page-mode-ab.png

<html>
<head>
<title>DEMO TABLE</title>
<meta charset="utf-8">
<style type="text/css">
 @media print {
a[href]:after {content: none !important;
table {
display: table;
border-collapse: separate;
border-spacing: 2px;
}
thead {display: table-header-group;}
tfoot {display: table-footer-group;}
tr { page-break-inside: avoid; }
.page {
page-break-after: always;
}
</style>
</head>
<body>  
<h3>Heading Comes Here</h3> 
<table border="1" style=”width: 100%”&gt;
<!--<caption>TABLE HEADER</caption>-->
<div class="page-footer-space">PAGE HEADER</div>
<colgroup>
    <col style="width: 20%" />
    <col style="width: 40%" />
    <col style="width: 40%" />
</colgroup>
<thead>
    <tr>
        <th rowspan="1">AUTOMATION</th>
        <th rowspan="1">MANUAL</th>
        <th rowspan="1">HYBRID</th>
    </tr>
    <tr>
        <!--<th>NEW COL ONE</th>-->  
    </tr>
 </thead>
 <tfoot>
    <tr>
        <td colspan="3">TABLE FOOTER</td>
    </tr>
 </tfoot>
 <tbody>
   <tr>
        <th>FILE 1</th>
        <td>FILE 1 COL 1</td>
        <td>FILE 1 COL 2</td>
    </tr>
    <tr>
        <th>FILE 1</th>
        <td>FILE 1 COL 1</td>
        <td>FILE 1 COL 2</td>
    </tr>
    <tr>
        <th>FILE 2</th>
        <td>FILE 2 COL 1</td>
        <td>FILE 2 COL 2</td>
    </tr>       
<!--Like so--> 
    </tbody>
</table>
</body>
</html
4

0 回答 0