Page break like in Word


https://www.nevron.com/Forum/Topic8796.aspx
Print Topic | Close Window

By Adam Coel - 10 Years Ago
Hi All,
Can anyone tell me how can I insert a page break after a paragraph? I don’t want to insert a new page break inline, but rather have the option to tell the paragraph to break the current page just like in Word.
By Nevron Support - 10 Years Ago
Hi Adam,
In NOV Text Editor you can insert a page breaks before and after every block (not just paragraph) just like in HTML. The PageBreakBefore and PageBreakAfter properties instruct the control layout to insert a page break before or after the block - for example:

NParagraph paragraph = new NParagraph("Page break appears after the paragraph");
paragraph.PageBreakAfter = true;

Another property of interest is the AvoidPageBreaksInside property, which tells the layout to position the block so that its always on one page (if possible). Hope this helps - let us know if you meet any problems or have any questions.