Table rows extend into the footer in PDF

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

Table rows extend into the footer in PDF

Post by bobmoon »

Some tables in my PDFs stick down into the footer, rather than breaking to the next page before the row. It doesn't happen with every table, and I can't figure out the cause. It doesn't happen in Word output.

I saw some posts on problems with images sticking into the footer in PDFs (such as this one), so maybe the solution is similar. Has anyone else had the same problems with tables?

One of the problem tables is nested inside a paragraph (<p><table>....</table></p>), but others are not. Some of them exhibit the bad behavior when a row is breaking over the page. Maybe that's the problem? Can I use page-break-inside:avoid to prohibit breaking inside rows, maybe tr {page-break-inside:avoid; }?

Thanks,
Bob
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Table rows extend into the footer in PDF

Post by LTinker68 »

If you have paragraphs inside cells then the page-break-inside should be set on the <p> tag (or create a complex selector so that it's only set on <p> tags that are inside <td> tags). If you don't have paragraphs in the cells, then the page-break-inside should be on the <td> tag, not the <tr> tag. If you have a combination, then set it on both the <p> and <td> tags.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

Re: Table rows extend into the footer in PDF

Post by bobmoon »

LTinker68 wrote:... create a complex selector so that it's only set on <p> tags that are inside <td> tags
This worked perfectly!

Code: Select all

	td p {
		page-break-inside:avoid; 
	}

Thanks!
Bob
Post Reply