跳至内容
菜单
此问题已终结
1 回复
10944 查看

Hi Community,

I am trying to generate a PDF report with some product lines in a TABLE. If the content exceeds the first page of the report and page-break happens, the contents are starting from a fixed position. I gave margin-top to the class page and it's only affecting the first page. Any Solution?

NB: Common for all Versions and only ODOO defined classes for QWEB reports are using.

See The Same Issue Referenced Here:

https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1524


形象
丢弃
最佳答案

Hi,

Try this

.page-break { page-break-before:always; margin-top: 10px;}


形象
丢弃
编写者

sure, let me try.

编写者

I can add this inside the report template, right?

You can add class in css and use it with div or directly add this line in template

<div style="page-break-before: always; margin-top: 10px; "/>

编写者

is there a class named page-break?

编写者

This is not working.

编写者

I am not asking to give a margin-top to a div, but for the content after a page break

Sorry, I have misunderstood it,

It is wkhtmltopdf issue,

https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1524

You can use web.basic layout in the template until it fixed.

相关帖文 回复 查看 活动
1
1月 24
1784
1
7月 24
6403
2
5月 18
13562
1
2月 22
2316
0
2月 21
2577