function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
etoeto 

pdf renderer does not show table headers on a per page basis

When using table headers and footers in a pdf, I'd like these headers and footers to be repeated on every page (as outlined in the w3c html spec), however the renderer does ignore this and only include one header at the beginning and one footer at the end of the table. (see code below)

 

Any idea how this can be activated? Or is this an unsupported feature?

 

Help would be highly appreciated to allow creation of e.g. quotes with dynamic content.

 

 

(http://www.w3.org/TR/REC-html40/struct/tables.html#edef-TFOOT  --> "When long tables are printed, the table head and foot information may be repeated on each page that contains table data.")

 



<table border="1" rules="groups">
<thead>
<tr>
<th>
HEADER
</th>
</tr>
</thead>
<tfoot>
<tr>
<td>FOOTER</td>
</tr>
</tfoot>
<tbody>
<tr><td>Line 1</td></tr>
.
.
.
<tr><td>Line 100</td></tr>
</tbody>
</table>


JeremyKraybillJeremyKraybill

I think you are going to have a tough time supporting this in the way you want. The PDF renderer does support the @page tag, but this only allows limited text to be placed at the head and foot of each printed page, and landscape orientation, e.g.

 

 

@page { /* Landscape orientation */ size:landscape; @top-right { /* Put page numbers in the top right corner of each page. */ content: "Page " counter(page); } }

 

 If I needed to support table headers and footers on each page, I would programmatically break up my table into chunks of rows that approximated one page, and then insert hard page breaks in between, which is also supported by the PDF renderer:

 

<div style="page-break-after: always;">&nbsp;</div>

Hope that helps

 

Jeremy Kraybill

Austin, TX

 

 

etoeto

Hi Jeremy,

 

unfortunately this doesn't help in my case.

 

As outlined in some other entries here in the forum, the @page tag is not fully supported, especially what dynamic content and footer/header is concerned.

 

However I did not want to "fake" page headers, but use really table headers. I try to create an offer which may contain lots of lines. In my special case I cannot split them programmatically as the content in each row can extremely vary in its length (some lines may even take a whole page). And-as it is defined in the html spec- I would really appreciate that the pdf renderer is capable of splitting tables on its own.

 

thanks

Ingo

jhelblingjhelbling

Hi eto,

 

Could you finally find a way to repeat your table's header on every page ? I have the exact same need and can't figure out how to achieve it ...

 

Thank you very much.