Hi,
I am trying to add TOC (Table of Contents) and then keep the disclaimer kind of text in the same page (in the second half of the page).
My TOC just have 2 or 3 items. But TOC is pushing the text which i want to the new page.
Is there any thing to set?
Here is the code i am using
builder.InsertTableOfContents("\\o \"1-1\" \\h \\z \\u");
builder.Writeln("Sample Text for Disclaimer etc ... to go in the same page as TOC");
Thanks in advance
Hi
Thanks for your inquiry. Could you please attach your input and output documents which cause the problem here for testing? I will investigate the issue and provide you more information.
Best regards,
Hi Andrey,
Updated the post with attachments.
Thanks
Hi
Thank you for additional information. This occurs because PageBreakBefore property of Paragraph is set. Please see the attached screenshot. You can try using the following code to change this option:
builder.CurrentParagraph.ParagraphFormat.PageBreakBefore = false;
builder.Writeln("This is the text");
Or you can simple modify your template.
Best regards,