Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
11031 มุมมอง

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.

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 24
1860
1
ก.ค. 24
6456
2
พ.ค. 18
13655
1
ก.พ. 22
2382
0
ก.พ. 21
2616