HtmlSaveOptions Constructor (SaveFormat)

Initializes a new instance of this class that can be used to save a document in the Html, Mhtml or Epub format.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public HtmlSaveOptions(
	SaveFormat saveFormat
)

Parameters

saveFormat
Type: Aspose.WordsSaveFormat
Can be Html, Mhtml or Epub.
Examples
Shows how to set a saved .html document to a specific version.
Document doc = new Document(MyDir + "Rendering.docx");

// Save the document to a .html file of the XHTML 1.0 Transitional standard
HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.Html)
{
    HtmlVersion = Aspose.Words.Saving.HtmlVersion.Xhtml,
    ExportXhtmlTransitional = true,
    PrettyFormat = true
};

// The DOCTYPE declaration at the top of this document will indicate the html version we chose
doc.Save(ArtifactsDir + "HtmlSaveOptions.HtmlVersion.html", options);
See Also