How to generate image from HTML with C#? - C# Sample Code(3)
If you have some C# applications that would benefit from having images and thumbnails (sometimes called thumbshots) of internet HTML web pages, you can try
ACA WebThumb ActiveX. With a few function calls in
Visual C#(C-sharp), it generates image from HTML web page and saves as
JPG,
GIF,
PNG,
BMP,
TIFF,
WMF and
EMF image. If you want to write a C# application including web thumbnails feature, this developer SDK may be very useful for you.
Guidelines: Generate image from HTML with C#
- Free download the HTML Converter SDK - ACA WebThumb ActiveX, and then install it.
- You will find a C# demo project in the folder {install-folder}\sample\c#.
- You can open this C# demo project with VS2003 or VS2005, build and run it.
Free Trial ACA WebThumb ActiveX Now
Example code: C# - Generate image from HTML
An example for C#:
string t_strSaveFolder = Server.MapPath("./");
string t_strLargeImage = t_strSaveFolder + "\\" + "acasystems.large.png";
string t_strSmallImage = t_strSaveFolder + "\\" + "acasystems.small.png";
ThumbMakerClass t_xThumbMaker = new ACAWebThumbLib.ThumbMakerClass();
t_xThumbMaker.SetURL("http://www.acasystems.com");
t_xThumbMaker.StartSnap();
long t_lWidth = t_xThumbMaker.GetThumbWidth();
long t_lHeight = t_xThumbMaker.GetThumbHeight();
t_xThumbMaker.SaveImage(t_strLargeImage);
t_xThumbMaker.SetThumbSize(320, 240, 0);
t_xThumbMaker.SaveImage(t_strSmallImage);
Example Snapshots that Generate from HTML web page by ACA WebThumb ActiveX
www.acasystems.com
|
www.download.com
|
www.msn.com
|
en.wikipedia.org
|
Free Trial ACA WebThumb ActiveX Now
Other resource about Converting HTML to image in C#:
ASP Sample Code: How to convert HTML to image with ASP?
C# Sample Code (1): How to convert HTML to image in C# (C-sharp)?
C# Sample Code (2): How to capture web page to image with C# (C-sharp)?
C# Sample Code (4): How to take screenshot of web page in C# (C-sharp)?
C# Sample Code (5): How to take snapshot from HTML in C# (C-sharp)?
Java Sample Code: How to convert HTML to image in Java?
PHP Sample Code(1): How to convert HTML to image with PHP?
PHP Sample Code(2): How to convert webpage to image with PHP?
.Net Sample Code: How to convert HTML to image in ASP.Net??
FAQ: Which image format is best?
FAQ: What programming languages does ACA WebThumb ActiveX Control support?
ACA WebThumb ActiveX Interface Reference
Free Download ACA WebThumb ActiveX Control
Wikipedia.org: C Sharp(C#)
Microsoft MSDN: Visual C# Developer Center