<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>System.Drawing/GDI+</title><link>http://forums.asp.net/150.aspx</link><description>Discuss manipulating and creating graphics using the System.Drawing namespace and GDI+.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How do i capture a web page as an image file?</title><link>http://forums.asp.net/thread/3256982.aspx</link><pubDate>Thu, 25 Jun 2009 06:57:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3256982</guid><dc:creator>pranu239</dc:creator><author>pranu239</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3256982.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=3256982</wfw:commentRss><description>&lt;p&gt;THNQ &lt;/p&gt;&lt;p&gt;THNX A LOT&lt;/p&gt;&lt;p&gt;IT&amp;#39;S WORKING 5N FOR ME&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How do i capture a web page as an image file?</title><link>http://forums.asp.net/thread/1368953.aspx</link><pubDate>Sat, 12 Aug 2006 03:33:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1368953</guid><dc:creator>seandong</dc:creator><author>seandong</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1368953.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=1368953</wfw:commentRss><description>&lt;p&gt;It sometimes very&amp;nbsp;&amp;nbsp;slowly, How can I&amp;nbsp;improve its speed?&lt;/p&gt;
&lt;p&gt;thanks&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: How do i capture a web page as an image file?</title><link>http://forums.asp.net/thread/788760.aspx</link><pubDate>Tue, 04 Jan 2005 02:19:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:788760</guid><dc:creator>Jigar</dc:creator><author>Jigar</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/788760.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=788760</wfw:commentRss><description>This code explains concept. it works on my localmachine, you will have to add code to delete file and proper error handling.&lt;pre&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; %&amp;gt;
&lt;br /&gt;
&amp;lt;%@ import Namespace=&amp;quot;System.Diagnostics&amp;quot; %&amp;gt;
&lt;br /&gt;
&amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt;
&lt;br /&gt;
    string url=&amp;quot;http://www.google.com&amp;quot;;
&lt;br /&gt;
    void Page_Load(object sender, EventArgs e) {
&lt;br /&gt;

&lt;br /&gt;
                if(Request.Params[&amp;quot;weburl&amp;quot;] != null){
&lt;br /&gt;
                     url = Request.Params[&amp;quot;weburl&amp;quot;];
&lt;br /&gt;
                }
&lt;br /&gt;
                string savepath = String.Format(&amp;quot;C:\\IECapt\\{0}.png&amp;quot; , System.Guid.NewGuid());
&lt;br /&gt;

&lt;br /&gt;
                System.Diagnostics.Process process = new System.Diagnostics.Process();
&lt;br /&gt;
                process.StartInfo.FileName  = &amp;quot;C:\\IECapt\\IECapt.exe&amp;quot;;
&lt;br /&gt;
	process.StartInfo.Arguments = String.Format(&amp;quot;\&amp;quot;{0}\&amp;quot; \&amp;quot;{1}\&amp;quot;&amp;quot;,url,savepath);
&lt;br /&gt;
	process.StartInfo.UseShellExecute = false;
&lt;br /&gt;
	process.Start();
&lt;br /&gt;
	process.WaitForExit();
&lt;br /&gt;
	process.Dispose();
&lt;br /&gt;
	Response.Clear();
&lt;br /&gt;
	Response.ContentType = &amp;quot;image/png&amp;quot;;
&lt;br /&gt;
	Response.WriteFile(savepath);
&lt;br /&gt;
	Response.End();
&lt;br /&gt;
    }
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/pre&gt;</description></item><item><title>How do i capture a web page as an image file?</title><link>http://forums.asp.net/thread/778572.aspx</link><pubDate>Mon, 20 Dec 2004 19:36:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:778572</guid><dc:creator>kingpoop</dc:creator><author>kingpoop</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/778572.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=150&amp;PostID=778572</wfw:commentRss><description>Hello All, 
&lt;br /&gt;
I am trying to render HTML output of a .aspx page into an image file. 
&lt;br /&gt;

&lt;br /&gt;
For example: If I have a web page named WebForm1.aspx, then I would like 
&lt;br /&gt;
to capture the output as a .jpeg file. 
&lt;br /&gt;

&lt;br /&gt;
There exists a utility on located on sourceforge.net: 
&lt;br /&gt;
IECapt - A Internet Explorer Web Page Rendering Capture Utility 
&lt;br /&gt;
http://iecapt.sourceforge.net/ 
&lt;br /&gt;

&lt;br /&gt;
and, I would like for my code to be able to perform the same function as this 
&lt;br /&gt;
utility, however, this utility is an .exe and I have to Shell out of my 
&lt;br /&gt;
aspx code and open a new process to run it as follows: 
&lt;br /&gt;
&lt;pre&gt;using System.Diagnostics; 
&lt;br /&gt;

&lt;br /&gt;
Process myProcess = new Process(); 
&lt;br /&gt;
myProcess.EnableRaisingEvents = False ; 
&lt;br /&gt;
myProcess.StartInfo.RedirectStandardOutput = False; 
&lt;br /&gt;
myProcess.StartInfo.UseShellExecute = False; 
&lt;br /&gt;
myProcess.StartInfo.WorkingDirectory = &amp;quot;C:\Inetpub\wwwroot\TXWB\Forms&amp;quot;; 
&lt;br /&gt;
myProcess.StartInfo.FileName = &amp;quot;C:\Inetpub\wwwroot\TXWB\Forms\IECapt.exe&amp;quot;; 
&lt;br /&gt;
myProcess.StartInfo.Arguments = _ 
&lt;br /&gt;
&amp;quot;http://localhost/TXWB/Forms/39610Confirm.aspx?objPATNO=186031&amp;quot; + &amp;quot;c:\test.jpeg&amp;quot;; 
&lt;br /&gt;
myProcess.Start(); 
&lt;br /&gt;
myProcess.WaitForExit(); 
&lt;br /&gt;
myProcess.Dispose(); &lt;/pre&gt;
&lt;br /&gt;
The resulting output I get by running the above is an image file of the target 
&lt;br /&gt;
.aspx page after it has rendered through the IE rendering engine. The problem 
&lt;br /&gt;
is I just can't figure out how to accomplish this same task within the .net 
&lt;br /&gt;
framework with existing .net assemblies. 
&lt;br /&gt;

&lt;br /&gt;
I tried using the System.Net.WebClient assembly and am able to fetch the 
&lt;br /&gt;
target .aspx page in a string variable as follows: 
&lt;br /&gt;
&lt;pre&gt;using System.Text; 
&lt;br /&gt;
using System.Net; 
&lt;br /&gt;

&lt;br /&gt;
string imageString; 
&lt;br /&gt;
string URLToLoad; 
&lt;br /&gt;
URLToLoad = &amp;quot;http://localhost/TXWB/Forms/39610Confirm.aspx?objPATNO=186031&amp;quot;; 
&lt;br /&gt;
ASCIIEncoding encASCIIEncoding = new ASCIIEncoding(); 
&lt;br /&gt;
WebClient wbcWebClient = new WebClient(); 
&lt;br /&gt;
imageString = encASCIIEncoding.GetString(wbcWebClient.DownloadData(URLToLoad)); &lt;/pre&gt;
&lt;br /&gt;
The imageString variable contains the HMTL markup of the target page, however, I 
&lt;br /&gt;
don't know how to render this HTML through the IE rendering engine to save it as 
&lt;br /&gt;
an image file. 
&lt;br /&gt;

&lt;br /&gt;
I tried to covert the source code for the IECapt utility, but it uses the 
&lt;br /&gt;
Active Template Library, and I don't know if it's possible to convert. 
&lt;br /&gt;
Here is the source code: 
&lt;br /&gt;
http://cvs.sourceforge.net/viewcvs.py/iecapt/IECapt/IECapt/IECapt.cpp 
&lt;br /&gt;

&lt;br /&gt;
If you have any input you could provide, I am greatful for your thoughts. 
&lt;br /&gt;
Thank you so much for take the time to read and reply and I greatly appreciate any suggestions. 
&lt;br /&gt;

&lt;br /&gt;
Mar 
&lt;br /&gt;</description></item></channel></rss>