0

Hi i want to convert HTML to an image using HTMLRenderer. I am able to convert the HTML to an image but the fonts are appearing bold and blurred. It seems the resolution breaks while converting.

Bitmap m_Bitmap = new Bitmap(850,700);
PointF point = new PointF(0, 0);
SizeF maxSize = new System.Drawing.SizeF(850, 700);
string stylesshet = "";

HtmlRenderer.HtmlRender.Render(
    Graphics.FromImage(m_Bitmap),
    "<table><tr><td> 123 </td><td>456</td></tr><tr><td> 123 </td><td>456</td></tr></table>",
    point,
    maxSize); 

m_Bitmap.Save(ImagePath, ImageFormat.Png);
Brett Wolfington
  • 6,587
  • 4
  • 32
  • 51
user1818042
  • 75
  • 1
  • 11
  • have you tried adjusting the specified size of the image? – ADyson Jul 06 '18 at 12:42
  • Yes but still pixels are breaking and looks blur and don't understand all fonts are coming as bold, if any other idea to convert to image plz let me know – user1818042 Jul 08 '18 at 03:26

0 Answers0