4

I was able to display tabular report in vf pdf format.this report contains large no of pages. using for displaying table body, but table header is coming in first page. i need to display header in each break up page. Tried with page page-break-before:always css, but not working. Is there any way to identify page breakup and append the header at the starting of page break in pdf?

2

A colleague of mine showed me this solution which I know works.

    <table width="100%" class="mainTable" style="-fs-table-paginate: paginate;">

        <thead style="display: table-header-group;">
            <tr>
                <th width="80px">TRANS DATE</th>
                <th width="120px">TRANS NO</th>
                <th width="120px">DOC REF</th>
                <th width="85px">TRANS TYPE</th>
                <th>PRODUCT/SERVICE DESCRIPTION</th>
                <th width="45px">CURR</th>
                <th width="120px">ORIGINAL AMOUNT</th>
                <th width="90px">AMOUNT DUE</th>
                <th width="70px">DUE DATE</th>
            </tr>
        </thead>

        <tbody style="display: table-row-group;">
            <!-- some rows -->
        </tbody>
  </table>
|improve this answer|||||
-1

Does adding these style help?

    table { page-break-inside:auto }
    tr    { page-break-inside:avoid; page-break-after:auto }
    thead { display:table-header-group }
|improve this answer|||||
-1

Where are you putting the page-break-before:always tag? You could try moving it to see if that helps. Also, are you using div id="header" for the header on each page or something else?

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.