How to stop a single table row repeating over 2 pages?

859 views
Skip to first unread message

ChrisRichards

unread,
May 9, 2011, 6:17:34 AM5/9/11
to Flying Saucer Users
I have a table in my HTML where the column headings repeat when the
table goes onto more than one page, and this works fine. The problem
is that some of the table rows (not heading rows) get split over 2
pages. Is there a way I can stop this? It doesn't look right on the
page.

Any help is appreciated.

Thanks
Chris

Naresh Chaurasia

unread,
May 9, 2011, 7:48:41 AM5/9/11
to flying-sa...@googlegroups.com
Can you provide the HTML containing the table. I believe you are passing the HTML as argument to ToPdf.java
--
Regards,
Naresh C

ChrisRichards

unread,
May 9, 2011, 10:13:16 AM5/9/11
to Flying Saucer Users
I generate the HTML in my web app, then just convert it to a pdf with
this code :

ITextRenderer renderer = new ITextRenderer();
renderer.setDocument(url);
renderer.layout();
renderer.createPDF(os);
os.close();

The html table is just a standard plain html table.

Chris

On May 9, 12:48 pm, Naresh Chaurasia <nc.java...@gmail.com> wrote:
> Can you provide the HTML containing the table. I believe you are passing the
> HTML as argument to ToPdf.java
>

Peter Brant

unread,
May 9, 2011, 10:33:37 AM5/9/11
to flying-sa...@googlegroups.com
page-break-inside: avoid on the <tr> might work. I know there are
some issues with page-break-inside: avoid on table cells though.

Pete

Reply all
Reply to author
Forward
0 new messages