我有以下单个HTML文件(包括样式/脚本):FQ.html
我有以下问题:
我已经迭代了解决方案尝试,最新的尝试有以下一些CSS ......
@media print{
@page {
size:1080px 1080px;
margin: 0px;
}
.page-break-before { page-break-before: always; display:block; width:200%;}
.page-break { display:block; page-break-after: always; width:200%; }
}
...和Javascript。
//set viewport height in print mode.
var height = 780; //screen.height;
//pick up the total table.
var table = $('#identification_section > table')[0];
//initialize the sum variable with height of title (h2 tag)
var sum = 24;
//loop all table rows including child tables
for (var i = 0, row; row = table.rows[i]; i++) { <