HtmlSaveOptions.HtmlVersion

HtmlSaveOptions HtmlVersion property. Specifies version of HTML standard that should be used when saving the document to HTML or MHTML. Default value is Xhtml.

HtmlSaveOptions.HtmlVersion property

Specifies version of HTML standard that should be used when saving the document to HTML or MHTML. Default value is Xhtml.

public HtmlVersion HtmlVersion { get; set; }

Examples

Shows how to specify version of HTML.

HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.HtmlVersion = HtmlVersion.Xhtml;
htmlSaveOptions.ExportXhtmlTransitional = true;

Converter.Create()
    .From(MyDir + "Simple.docx")
    .To(ArtifactsDir + "HtmlSaveOptions.ExportXhtmlTransitional.html", htmlSaveOptions)
    .Execute();

See Also