FileConversionHelper.HtmlToImage Method

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

HtmlToImage(String, Int32, Int32, Int32, Color)

Renders the specified HTML into a new image of the requested size. The HTML will be layout by the given size but will be clipped if it cannot fit.

public static Image HtmlToImage(string html, int width, int height, int margin = 0, Color backgroundColor = null)

Parameters

html
System.String
width
System.Int32
height
System.Int32
margin
System.Int32
backgroundColor
System.Drawing.Color

Returns

System.Drawing.Image

The generated image of the html.