We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Inserting a new page break if inserted text or table goes across to the next page

Thread ID:

Created:

Updated:

Platform:

Replies:

116291 May 12,2014 04:56 AM May 14,2014 04:53 AM Windows Forms 3
loading
Tags: DocIO
Chris Crowhurst
Asked On May 12, 2014 04:56 AM

Hi,

I am inserting text and tables into a middle of an existing document. Sometimes the table may spread across on to the next page in the document. If this happens I would like to be able to insert a page break before the table is inserted so that the table appears on its own page and is not split across two pages. What is the best way to do this ?

My intentions was to do the following :

1. Create a bookmark before the table is inserted, and get the current page count.
2. Insert the table, then get the current page count. If the current page count has increased I would then go back to the bookmark and insert a page break.

To do this I would need to get the current page count.


Sathish K [Syncfusion]
Replied On May 13, 2014 04:44 AM

Hi Chris,

 

Thank you for your interest in Syncfusion products.

 

We have prepared a sample to meet your requirement that to insert a table after a bookmark and to insert a page break after bookmark if page count is increased. Please find the attached sample and let us know if this helps you.

 

Please let us know if you have any other questions.

 

Regards,

Sathish


Attachment: Sample_1eedcf5f.zip

Chris Crowhurst
Replied On May 13, 2014 10:22 AM

Thanks that worked a treat!


Sathish K [Syncfusion]
Replied On May 14, 2014 04:53 AM

Hi Chris,

 

Thank you for your update.

 

Happy to hear from you. It is our please to know that the updated sample has met your requirement. Please let us know if you need any further assistance. We will be happy to assist you as always.

 

Regards,

Sathish


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;