【发布时间】:2016-12-25 16:35:05
【问题描述】:
我想从 webview.viewPrintformattor 打印文档,但分页符在 UIwebview 中不起作用。请检查下面的CSS。
<style type="text/css">
@media print {
.page-break {
display: block;
page-break-after: always;
}
@page {
size: A4 portrait; /* can use also 'landscape' for orientation */
margin: 0.5in;
padding: 1em;
}
}
body {
font-family: calibri, arial, sans-serif;
font-size: 15px;
line-height: 1.5;
color: #000000;
}
h1, h2, h3 {
margin: 0;
padding: 0;
}
td {
vertical-align: top;
}
.ar {
direction: rtl;
text-align: justify;
}
.page-break {
display: block;
page-break-after: always;
}
@page {
size: A4 portrait; /* can use also 'landscape' for orientation */
margin: 0.5in;
padding: 1em;
}
</style>
并使用下面的代码进行分页。
<div class="page-break"></div>
【问题讨论】:
标签: html ios css swift uiwebview