HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML v3 Archived Forums (Read Only) › General questions / FAQ › Any way to repeat table headers?
- This topic has 6 replies, 2 voices, and was last updated Dec 14, 2009
13:50:44 byUNeumann.
-
AuthorPosts
-
November 11, 2009 at 10:23#26284
Since THEAD is not supported, is there any other way to repeat table headers on each page in pd4ml?
November 11, 2009 at 11:50#27608For the time being it is only possible with pd4ml.enableTableBreaks() API call (or its JSP taglib mapping – a corresponding atribute of
<pd4ml:transform>).The mode forces PD4ML to repeat all table rows built with
<th>only.November 23, 2009 at 16:18#27609We tried enableTableBreaks(true) in the API, but it had no effect on the
<th>-Table-Headers. Our table-headers looks something like:
<th> <tr style="background-color:blue;"> <td style="text-align:right;">SOME_COLUMN_HEADER_TEXT</td> ... </tr> </thead>
Is there something we have to change to make the table-headers repeated on each page?November 23, 2009 at 16:28#27610PD4ML does not support
<thead>tag. Table header for PD4ML is the top row (or rows), consists of<th>only:<table> <tr><th>Column caption 1</th><th>Column caption 1</th></tr> <tr><th colspan=2>Still table header</th></tr> ... <tr><td>Data 1</td><td>Data 2</td></tr> ... </table>
November 25, 2009 at 14:48#27611Thanks, thats now working. But with one problem:
When the table-rows consists of<td>’s that show multiline text (with
)
and the page-break is right inside one of this elements, it dosesnt work correctly.
The new header and the continuation of the text start at the same position and
overwrite each other.
Is there any known way in pd4ml to prevent this?
Some kind of “page-protecton” for a<tr>for example?December 11, 2009 at 16:36#27612enableTableBreaks(true) implicitly sets “page-break-inside: avoid” for TR and TABLE elements. If a particular row is broken (by an implicit page break) – that means the table row height exceeds the page height. In the case it simply continues the row content on the next page. In such case PD4ML does not put the table header on the top of the second row part.
But, as you wrote, it writes the header (and overwrites the content).
Could you please send to PD4ML support the HTML sources which could help us to reproduce the issue.
December 14, 2009 at 13:50#27613Since our system directly sends the report-information, generated using a html-template-file, from a database to pd4ml using an URL, the html-code itself isn’t saved. If the problem occurs again, I will try to extract the html-code and send it to you.
-
AuthorPosts
The forum ‘General questions / FAQ’ is closed to new topics and replies.
