Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 24, 2012 04:16 PM by dardanus
Jul 06, 2009 07:47 AM|LINK
I am not sure it is the appropriate place to put my question. However, I want to save the contents of a <div> element to an image. It is more or less like a screen shot, but only covers the area inside particular div. Can any one help me in it.
Jul 06, 2009 09:57 AM|LINK
Jul 06, 2009 12:09 PM|LINK
Thanks for reply, but these articles are related to exporting Text as image. I want a screen capture utility thrugh which i can capture all the content of a div as they are appearing on my browser.
Jul 06, 2009 02:27 PM|LINK
Use free service provided by http://www.thumbshots.org/.
Create a new page and give the URL of that page in which there is only one DIV with you content.
Jul 06, 2009 03:31 PM|LINK
<div id="painter" runat="server" style="left: 280px; position: absolute; top: 82px;
width: 311px; height: 388px; background-color: #ccccff;">
<asp:Button ID="Button1" runat="server" Style="left: 733px; position: absolute; top: 266px"
Text="Button" OnClick="Button1_Click" />
protected void Button1_Click(object sender, EventArgs e)
string value = painter.Style.Value.Split(';');
string width = value;
string height = value;
string bgcolor = value;
string widthArray = width.Split(':');
string heightArray = height.Split(':');
string bgcolorArray = bgcolor.Split(':');
int w = int.Parse(widthArray.Replace("px", ""));
int h = int.Parse(heightArray.Replace("px",""));
string color = bgcolorArray;
System.Drawing.Color c = System.Drawing.Color.FromName("#ccccff");
System.Drawing.Bitmap bt = new System.Drawing.Bitmap(w, h);
System.Drawing.Graphics oGraphics = System.Drawing.Graphics.FromImage(bt);
System.Drawing.Brush brush = new System.Drawing.SolidBrush(k);
oGraphics.FillRectangle(brush, 0, 0, w, h);
Jul 07, 2009 03:56 AM|LINK
THanks for reply, but i want a generalized way to capture my web page's div. I am looking something similar to FireShot.
Dec 09, 2009 12:02 PM|LINK
and what if this div had controls inside, how could I re-draw them all inside the image ??
Dec 10, 2009 11:35 AM|LINK
> I want a screen capture utility thrugh which i can capture all the content of a div as they are appearing on my browser.
For a screen capture utility try GADWIN Web SnapShot and PrintScreen from
Nov 24, 2012 04:16 PM|LINK
Hi! Have you found any solution?? I have the same problem, could you help me?