客户希望在生成的pdf中具有折叠标记和重复的背景图像。我试过
<style type="text/css">
@page {
size: 210mm 297mm;
}
</style>如doc中所述,但pdf的内容周围总是有一个白色/空白边框。客户希望他的背景在整个pdf和这个白色/空白区域内的折叠标记上延伸。对我来说,grails renderingservice为可能无法打印的区域保留了一些空间。我怎样才能“打印”到那个区域?我在文件里什么也没找到,谷歌也帮不上忙。
发布于 2014-02-05 15:41:45
解决方案是:
<html>
<head>
<title>...</title>
<style type="text/css">
@page {
size: 210mm 297mm;
margin: 0
}
</style>
</head>
<body>
<div style="float:left">
<div style="height:2px;width:6px;margin-top: 105mm; left:0;background-color: black"></div>
<div style="height:2px;width:6px;margin-top: 105mm; left:0;background-color: black"> </div>
</div>
<div><!-- content here --></div>
<div style="page-break-after:always;"></div>
</body>
</html>但这就引出了下一个问题:如何以通用的方式在每一页上重复折叠标记?
https://stackoverflow.com/questions/21548008
复制相似问题