1

I have a html site that allows you to create PDF. When I generate a PDF in the site, tables with large content are breaking to the next page even when there is space on the page. For example, check the following image.

enter image description here

How do I control this behavior? Ideally I would like the table not to break to the next page.

I have the following CSS for tables. Looking only for CSS solution.

table td, table th {width: auto!important;}
table, th, td {border: .1px light gray;}
table {width: 100%!important; table-layout: fixed;}
table {display: table-header-group;}
thead {display: table-header-group;}
tfoot {display: table-header-group;}
table {-fs-table-paginate: paginate;}
tr {page-break-inside: avoid;}
4

1 回答 1

0

你可以试试这个:

table{ page-break-inside: auto }
于 2019-11-04T18:26:53.163 回答