SaveOptionsPrettyFormat Property

When true, pretty formats output where applicable. Default value is false.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public bool PrettyFormat { get; set; }

Property Value

Type: Boolean
Remarks

Set to true to make HTML, MHTML, EPUB, WordML, RTF, DOCX and ODT output human readable. Useful for testing or debugging.

Examples
Shows how to pass an option to export HTML tags in a well spaced, human readable format.
Document doc = new Document(MyDir + "Document.docx");

HtmlSaveOptions htmlOptions = new HtmlSaveOptions(SaveFormat.Html);
// Enabling the PrettyFormat setting will export HTML in an indented format that is easy to read
// If this is setting is false (by default) then the HTML tags will be exported in condensed form with no indentation
htmlOptions.PrettyFormat = true;

doc.Save(ArtifactsDir + "Document.SaveHtmlPrettyFormat.html", htmlOptions);
See Also