I have a string variable which holds HTML markup. This HTML markup basically represents the email content.
Now I want to create an image from this string content whi
Thanks all for your responses. I used HtmlRenderer external dll (library) to achieve the same and found below code for the same.
Here is the code for this
public void ConvertHtmlToImage()
{
Bitmap m_Bitmap = new Bitmap(400, 600);
PointF point = new PointF(0, 0);
SizeF maxSize = new System.Drawing.SizeF(500, 500);
HtmlRenderer.HtmlRender.Render(Graphics.FromImage(m_Bitmap),
"This is a shitty html code
"
+ "This is another html line
",
point, maxSize);
m_Bitmap.Save(@"C:\Test.png", ImageFormat.Png);
}