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 sh***y html code
This is another html line
", point, maxSize);m_Bitmap.Save(@"C:\Test.bmp");
"HtmlRenderer" is an external namespace that is being used here. However, I'm getting an exception at the "m_Bitmap.Save(@"C:\Test.bmp");" line that says : A generic error occured in GDI+.
I'm unable to understand why this exception is being raised when the same code is running perfectly in my colleague's system.
Please help. Thanks a lot.
I'm unable to understand why this exception is being raised when the same code is running perfectly in my colleague's system.
Please help. Thanks a lot.

VulpesPosted May 12, 2013, 12:05 PM
This will probably not be permitted unless you're running with administrative privileges.
So I'd try saving to a different directory.
Amogh NatuPosted May 13, 2013, 1:56 AM