How to NOT repeat table header on multiple pages

1,319 views
Skip to first unread message

rynop

unread,
Nov 16, 2011, 3:09:45 PM11/16/11
to dompdf
How do you disable the feature where if your table spans multiple
pages, the <thead> is repeated on pages 2-X?

I have a table with some complex colspan and rowspan and this header
repeat messes up the rendering on pages 2-X

BrianS

unread,
Nov 18, 2011, 4:54:53 PM11/18/11
to dom...@googlegroups.com
If you remove the thead do things display correctly? There are a few problems we need to address related to tables spanning pages, and your issues may not be related to the thead.

Can you just move your thead into the tbody?

rynop

unread,
Nov 18, 2011, 5:20:41 PM11/18/11
to dom...@googlegroups.com
Hi Brian - thanks for the reply.

Well first thing I ran into was if elements inside a <tbody> spanned multiple pages, I would get a  "Frame not found in cellmap" error. Turns out this is a pretty common problem.  After removing the tbody, PDF did render.

If I remove the <thead> and </thead>, I once again get the "Frame not found in cellmap" error.

I would really like to keep the thead and tbody tags, as it allows me to re-use my stylesheet and my code that renders the table in my website view.

I've attached a single html file with inline css that reproduces the problem. in practice I link to the css:
<link href="css/forecasts/pdf.css" type="text/css" rel="stylesheet" />


test.html
Reply all
Reply to author
Forward
0 new messages