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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

delete blank page in a worddocument

Thread ID:

Created:

Updated:

Platform:

Replies:

143575 Mar 27,2019 02:50 PM UTC Apr 1,2019 12:42 PM UTC WinForms 3
loading
Tags: DocIO
AtliDev
Asked On March 27, 2019 02:50 PM UTC

hey,
i have a word document with more than 3 sections,
i want to delete the empty page in every section, maybe the blank page is in the middle of the worddocument.
Thanks

Dilli Babu Nandha Gopal [Syncfusion]
Replied On March 28, 2019 05:50 PM UTC

Hi AltiDev, 
 
Greetings from Syncfusion. 
 
The Word document is a flow document in which contents will not be preserved page by page; instead the contents will be preserved sequentially section by section.

Word viewer/editor renders the contents of the Word document page by page dynamically when opened for viewing or editing. This page wise rendered information will not be preserved in the saved file level.

Essential DocIO is a non-UI component that provides a full-fledged document object model (logical structure as defined in the file level) to manipulate the Word document contents without converting page by page. So, it is not feasible to identify the particular page (empty page in middle) directly using DocIO.

Alternatively, you can iterate into the document elements and remove the empty paragraphs in the Word document. Please refer the below documentation link to know more about working with Word document using DocIO.
Iterating through the document elements
Iterating through the table elements 
 
 
Regards, 
Dilli babu. 


AtliDev
Replied On March 29, 2019 08:48 AM UTC

hi, thanks for rely.
i can't use this method, deleting blank paragraph.
cause i use a lot of pagebreak between the chapter of my worddocument
 and this method will delete the pagebreak.
Regards.


Abirami Varadharajan [Syncfusion]
Replied On April 1, 2019 12:42 PM UTC

  
Hi AltiDev, 
 
We have prepared a sample application to remove empty paragraphs in the Word document. In DocIO, pageBreak is one of the paragraph item so, it is considered as non-empty paragraph and not removed from the Word document. Please find the sample from the below link: 
 
 
Regards, 
Abirami 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;