Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何使用grails渲染服务打印折叠标记?_Css_Pdf_Grails_Rendering - Fatal编程技术网

Css 如何使用grails渲染服务打印折叠标记?

Css 如何使用grails渲染服务打印折叠标记?,css,pdf,grails,rendering,Css,Pdf,Grails,Rendering,客户希望在生成的pdf中有折叠标记和重复的背景图像。我试着 <style type="text/css"> @page { size: 210mm 297mm; } </style> @页面{ 尺寸:210毫米297毫米; } 如中所述,但pdf内容周围始终有一个白色/空白框。 客户希望他的背景延伸到整个pdf和这个空白/空白区域内的折叠标记。 对我来说,grails renderingservice似乎为可能不可打印的区域保留了一些空间。如何“打印”到

客户希望在生成的pdf中有折叠标记和重复的背景图像。我试着

<style  type="text/css">
 @page {
   size: 210mm 297mm;
 }
</style>

@页面{
尺寸:210毫米297毫米;
}
如中所述,但pdf内容周围始终有一个白色/空白框。 客户希望他的背景延伸到整个pdf和这个空白/空白区域内的折叠标记。 对我来说,grails renderingservice似乎为可能不可打印的区域保留了一些空间。如何“打印”到该区域? 我在文档中找不到任何东西,谷歌也帮不上忙。

解决方案是:

<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>

...
@页面{
尺寸:210毫米297毫米;
保证金:0
}
但这就引出了下一个问题:如何以通用的方式在每页上重复折叠标记