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. Image for the cookie policy date

delete blank page in a worddocument

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.

3 Replies

DB Dilli Babu Nandha Gopal Syncfusion Team 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 
Dilli babu. 

AT AtliDev 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.

AV Abirami Varadharajan Syncfusion Team 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: 

Live Chat Icon For mobile
Up arrow icon