如何使用库为从 HTML 到 pdf 的所有生成的 pdf 页面添加页面边框wkhtmltopdf
?
我试过了
div.page
{
page-break-after: always;
page-break-inside: avoid;
border: 5px double !important;
}
但没有运气。
如何使用库为从 HTML 到 pdf 的所有生成的 pdf 页面添加页面边框wkhtmltopdf
?
我试过了
div.page
{
page-break-after: always;
page-break-inside: avoid;
border: 5px double !important;
}
但没有运气。
只需使用以下 CSS 创建一个 HTML 页面并尝试使用 wkhtmltopdf 生成 pdf 文件
<html>
<head>
<style>
body {
width: 100%;
height: 2000px;
margin: 0;
padding: 0;
}
.border {
position: fixed;
top: 0;
left: 0;
border: 5px double;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
page-break-after: always;
page-break-inside: avoid;
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="border"></div>
</body>
</html>