HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › PD4ML Tips & Tricks › How to auto-split a table, that does not fit a single page?
- This topic has 4 replies, 2 voices, and was last updated May 15, 2012
12:18:30 byPD4ML.
-
AuthorPosts
-
May 30, 2009 at 20:42#26177
TR {page-break-inside: avoid} CSS definition is intended to protect table rows from being broken.
PD4ML also provides a limited experimental support for table header replication:
You need to invoke pd4ml.enableTableBreaks(true) method (or to set enableTableBreaks attribute of
<pd4ml:transform>) – it implicitly defines page-break-inside: avoid for<tr>elements and replicates the table heading row(s) to the tops of all table parts. (heading row there is a row, which consists of<th> elements only) In both of the cases the table border and the table background can not reflect the splits on <tr>
level. So the best way is to disable the table border and background and to define borders and background colors for single cells.TD { border: 1px solid red } TABLE { border: none; border-collapse: collapse }May 8, 2012 at 06:48#27222While using enableSmartBreakTable, I am getting unwanted space between header and data from the second page of the portlet.
In the first page for the same portlet it is good. Kindly help me with a best solution ASAP
May 9, 2012 at 13:24#27223Can someone please help me on the above issue.
May 9, 2012 at 14:13#27224More Inputs:
I am using the below two options for making header for the same portlet to appear on each page if data exceeds the page
pd4ml.addStyle(“TABLE,DIV {page-break-inside: auto !important}”, true);
pd4ml.enableSmartTableBreaks(true);This option is working with datagrid with normal header. But when it comes with multiple level of headers(mix of headers), then the issues arises.
Example Grid:
The above options is working for the below format
Header1 Header2 header 3
data1 data2 data3the above option does not work for the option
Header1 header2 GroupHeader1 GroupHeader2
SubGroupHeader1
Header3 Header4 Header5 Header6 Header7
data1 data2 data3 data4 data5 data6 data7May 15, 2012 at 12:18#27225I am afraid PD4ML cannot replicate multiple levels of headers from page to page.
Currently as a table header it interprets the first table rows, consist of
<th>elements only.<thead>tags or similar are not supported. -
AuthorPosts
The forum ‘PD4ML Tips & Tricks’ is closed to new topics and replies.
