DocumentEnsureMinimum Method
If the document contains no sections, creates one section with one paragraph.

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
public void EnsureMinimum()
Shows how to ensure the Document is valid (has the minimum nodes required to be valid).
// Create a blank document then remove all nodes from it, the result will be a completely empty document.
Document doc = new Document();

// Ensure that the document is valid. Since the document has no nodes this method will create an empty section
// and add an empty paragraph to make it valid.
See Also