Remove Breaks in Python

Aspose.Words - Remove Breaks

Python Code

## Open the document.

doc = self.Document(self.dataDir + "TestFile.doc")
\# Remove the page and section breaks from the document.
\# In Aspose.Words section breaks are represented as separate Section nodes in the document.
\# To remove these separate sections the sections are combined.
self.removePageBreaks(doc)
self.removeSectionBreaks(doc)
\# Save the document.
doc.save(self.dataDir + "TestFile Out.doc")

Download Running Code

Download Remove Breaks (Aspose.Words) from any of the below mentioned social coding sites: