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

Free Support Forum - aspose.com

ReportingEngine.BuildReport with DataTable Aspose.Words

If my table spans over to the next page, is it possible to insert a page break after the table so the next pages keep their layout?

@Jnelson999

Thanks for your inquiry. Please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

input.zip (15.0 KB)
output.zip (122.2 KB)
desired results.zip (15.0 KB)
AsposeWord.Tester.zip (5.5 MB)

@Jnelson999

Thanks for sharing the detail. In your case, we suggest you please set the “page break before” option for the paragraph where you want to insert page break. Please check the attached image for detail. We have attached the modified document with this post for your kind reference. input_modified.zip (15.2 KB)

That seems obvious now that I see your answer. Thank you so much. One last question, how would you handle this if you were merging two word doc files? I would not be able to have a page break if the second word file if it was only a single page

@Jnelson999

Thanks for your query. Please refer to the following article if you want to merge two documents.
Joining and Appending Documents

Please ZIP and attach your input and expected output documents here for our reference. We will then provide you more information about this query.