【问题标题】:How to print folding marks with grails rendering service?如何使用 grails 渲染服务打印折叠标记?
【发布时间】:2014-02-04 09:04:48
【问题描述】:
客户希望在生成的 pdf 中包含折叠标记和重复的背景图像。我试过了
<style type="text/css">
@page {
size: 210mm 297mm;
}
</style>
如doc 中所述,但 pdf 的内容周围总是有一个白色/空白框。
客户希望他的背景能够覆盖整个 pdf 和这个白色/空白空间内的折叠标记。
对我来说,看起来 grails renderingservice 为可能不可打印的区域保留了一些空间。我怎样才能“打印”到那个区域?
我在文档中一无所获,谷歌也无能为力。
【问题讨论】:
标签:
css
pdf
grails
rendering
【解决方案1】:
解决办法是:
<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>
但这又引出了下一个问题:如何以通用的方式在每一页上重复折叠标记?