Forum Bugs

Problem with pagination trying to get a heading to appear with its text, in the same TR element

Christine
How can I get this heading to appear on the same page as the text? I'm specifying

page-break-after: avoid


for the heading div and

page-break-inside: auto


for the remaining text

I've supplied a simplified html file with the issue

I've tried specifying orphans but not been able to get that to influence the outcome.

We're using Prince 11.4

Many thanks for your help
  1. test.html8.6 kB
    Illustrates the pagination issue
  2. test.pdf38.6 kB
    Example PDF
markbrown
Hi,

The problem is with using 'display: inline-block', which prevents the block of text after the heading from being fragmented. Prince is trying to reduce the resulting overflow by pushing the block to the next page, although you can see it still overflows on the second page.

One way you could get the desired result is to remove the 'display: inline-block' declarations and instead add the following:

.box { display: table; }
.box > div { display: table-cell; }


Cheers,
Mark
Christine
Thank you - that has worked perfectly.