HtmlSaveOptions.MetafileFormat

HtmlSaveOptions MetafileFormat property. Specifies in what format metafiles are saved when exporting to HTML MHTML or EPUB. Default value is Png meaning that metafiles are rendered to raster PNG images.

HtmlSaveOptions.MetafileFormat property

Specifies in what format metafiles are saved when exporting to HTML, MHTML, or EPUB. Default value is Png, meaning that metafiles are rendered to raster PNG images.

public HtmlMetafileFormat MetafileFormat { get; set; }

Remarks

Metafiles are not natively displayed by HTML browsers. By default, Wordize converts WMF and EMF images into PNG files when exporting to HTML. Other options are to convert metafiles to SVG images or to export them as is without conversion.

Some image transforms, in particular image cropping, will not be applied to metafile images if they are exported to HTML without conversion.

Examples

Shows how to specify format in which metafiels are exported to HTML.

HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.MetafileFormat = HtmlMetafileFormat.Svg;

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

See Also