HTMLSaveFormat Enum

HTMLSaveFormat enumeration

Specifies format in which document is saved. You can find more info about saving HTMLDocument in article.

public enum HTMLSaveFormat


Original0The document will be saved in its original format.
Markdown1Document will be saved as Markdown.
MHTML2Document will be saved as MHTML.


You can download the complete examples and data files from GitHub.


using System.IO;
using Aspose.Html;
using Aspose.Html.Saving;
  // Prepare an output path for a document saving
  string documentPath = Path.Combine(OutputDir, "");

  // Prepare HTML code
  var html_code = "<H2>Hello World!</H2>";
  // Initialize a document from the string variable
  using (var document = new HTMLDocument(html_code, "."))
    // Save the document as a Markdown file
    document.Save(documentPath, HTMLSaveFormat.Markdown);

*OutputDir - user output folder path.

See Also