简体   繁体   English

关于分页符的 dompdf 表格宽度问题

[英]dompdf table width issue on page break

I have two div's each of the same width, the right div has more data than the left div.我有两个宽度相同的 div,右边的 div 比左边的 div 有更多的数据。 Right div's data table changes its width on a page break.右 div 的数据表在分页符上更改其宽度。 After the page break, the width of the table increases.分页后,表格的宽度增加。 I need a solution quickly, can anyone help?我需要快速解决方案,有人可以帮忙吗?

I have used style attributes page-break-after and page-break-before and page break-inside but nothing is working.我使用了样式属性 page-break-after 和 page-break-before 和 page break-inside 但没有任何效果。

在此处输入图片说明

Is it right that you build your HTML like a table column by column?您像逐列表格一样构建 HTML 是否正确?

Maybe it would be better to render each row in its own div.也许最好在自己的 div 中呈现每一行。 So the break would only before or after a narrow item and not within your tall main wrapper.所以休息只会在一个狭窄的物品之前或之后,而不是在你高大的主包装内。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM