HTMLSaveFormat Enum

HTMLSaveFormat enumeration

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

public enum HTMLSaveFormat

Values

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

Remarks

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

Examples

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

  // 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