HtmlSaveOptions.ImageResolution

HtmlSaveOptions ImageResolution property. Specifies the output resolution for images when exporting to HTML MHTML or EPUB. Default is 96 dpi.

HtmlSaveOptions.ImageResolution property

Specifies the output resolution for images when exporting to HTML, MHTML or EPUB. Default is 96 dpi.

public int ImageResolution { get; set; }

Remarks

This property effects raster images when ScaleImageToShapeSize is true and effects metafiles exported as raster images. Some image properties such as cropping or rotation require saving transformed images and in this case transformed images are created in the given resolution.

Examples

Shows how to configure exporting images to HTML.

HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions();
htmlSaveOptions.ImageResolution = 300;
htmlSaveOptions.ScaleImageToShapeSize = false;
// Configure folder and it's alias where images will be written to.
htmlSaveOptions.ImagesFolder = ArtifactsDir + "images";
htmlSaveOptions.ImagesFolderAlias = "images";

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

See Also