We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word sections and page breaks problem when i am appending dynamic data

Dear Concern.,

in my word document iam having the dynamic data will be placed in respective the sectiions.

i given the movetosection(number) if not data i need to remove the section then iam getting the numbering problem so iam clear the section so iam getting the space problem i want to

create a section and appened the dynamic table row by row ....else is there any option to move the section with out having any numbers 1234... just move to next section if it is available.

iam dynamically uploading the data so how can i break the page and display when my heading is end of the page...

regards

amareswari

Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request.

1. You can determine index of current section and increase it to move document builder cursor to the next section. Please see the following code:

//Determine index of current section

int currIdx = doc.Sections.IndexOf(builder.CurrentSection);

//Move document builder cursor to the next section

if ((currIdx + 1) < doc.Sections.Count)

builder.MoveToSection(currIdx + 1);

2. There is no way to detect when pages starts and ends. Aspose.Words document represents content and formatting of a document, not its layout into lines and pages.

Best regards.