Welcome Guest Search | Active Topics | Sign In | Register

Page break's without generating sub-heading Options
Phil
Posted: Monday, December 6, 2021 7:24:34 AM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2017
Posts: 66
Hello, I have a long list of items that have sub-headings which looks like this when shown in the browser

SubHeading1
list-item-1a
list-item-1b
list-item-1c
list-item-1d

SubHeading2
list-item-2a
list-item-2b
list-item-2c

SubHeading3
list-item-3a
list-item-3b
list-item-3c
list-item-3d
list-item-3e
...

When generated in the PDF each heading should come out as normal but if a list goes over the page the heading should be outputted - for example if SubHeading3 above went over the page, the PDF should look like

...
SubHeading3
list-item-3a
list-item-3b
list-item-3c
list-item-3d
**----page-break----**
SubHeading3
list-item-3e
...

I can get this to work on most occasions by putting the data into a table, the SubHeadings in the thead/tr (with a "page-break-inside:avoid") and the list-item's in the tbody/tr (with a "page-break-inside:avoid"). However in certain situations one row is outputted on a new page without the SubHeading - so instead of the above I get

...
SubHeading3
list-item-3a
list-item-3b
list-item-3c
list-item-3d
**----page-break----**
list-item-3e
...

The canvas is defined as 11x8.5 (letter/landscape) and I have reduced the available space (within the canvas) by 0.2 inches to allow room for a page number. I have tried to remove paddings/margins around the table cells where the page-break is however I still have the problem - is there anything else I need to do ?

Kind regards
eo_support
Posted: Monday, December 6, 2021 1:56:36 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

Using thead is the correct way to do this. If it does not work properly for you, please try to isolate the problem into a small test project and send it over to us. We would need to debug into our code in order to find out exactly why it does not repeat SubHeading3 in your case.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.