我想通过使用CSS介质打印缩小页面来在一页中打印多页,例如2(每页50%)或4(每页25%)。我只能看到诸如在打印时更改页面设置之类的选项,但我不希望那样。任何人都可以提出建议。
http://a-pdf.com/faq/i/combine-defined-pdf-pages-into-one-page-mode-a-b.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%”>
<!--<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