CJH
CJH

Reputation: 1594

MigraDoc page break on sub-sections

I am using MigraDoc which might generate a document like the following example:

enter image description here

However I want to be able to 'bind' a given number of paragraphs/tables (or anything else) together so that if a page break is detected anywhere during any of the items, the whole block is moved onto the next page - for example (where highlighted text is all 'bound' together somehow):

enter image description here

Hope the question makes sense...?! I’m not sure where to start with this but have a definitive requirement for it!

Upvotes: 1

Views: 646

Answers (1)

Paragraphs have a KeepTogether property that prevents pagebreaks within the paragraph.

Paragraphs have a KeepWithNext property that prevents pagebreaks between this paragraph and the next one. A typical use case are head lines that make no sense at the bottom of the page.

For tables, see here:
https://stackoverflow.com/a/1327228/162529

Upvotes: 2

Related Questions