Provide state-of-the-art image capture, screen capture, video capture and audio capture software
Home     Download     Purchase     Support     Contact     View my shopping cart
You are here: ACASystems » ACA WebThumb ActiveX Control » FAQ » Convert HTML to image in C#(C-sharp)

How to convert HTML to image in C# - C# Sample Code(1)

To convert HTML to image in C#(C-sharp), the easiest way is to use our HTML converter SDK - ACA WebThumb ActiveX.

With a few function calls in Visual C#(C-sharp), it takes the snapshots of given URLs as JPG, GIF, PNG, BMP, TIFF, WMF and EMF image, it helps you convert the HTML web page to images in batch, capture full length website screenshots, generate thumbnail image previews of web pages.

Tips: ACA WebThumb ActiveX Control is a developer SDK for converting HTML web page to image. If you are looking for a windows application to coverting HTML web page to image and save HTML to JPG/PNG/GIF/TIF files, please free trial ACA HTML to Image Converter.

Guidelines: Convert HTML to image in C#

  1. Free download the HTML Converter SDK - ACA WebThumb ActiveX, and then install it.
  2. You will find a C# demo project in the folder {install-folder}\sample\c#.
  3. You can open this C# demo project with VS2003 or VS2005, build and run it.

Free Trial ACA WebThumb ActiveX Now

Example code: C# - Convert HTML to image

An example for C#:

// C# - Convert HTML to Image
// Set the image filename.
string t_strSaveFolder = Server.MapPath("./");           
string t_strLargeImage = t_strSaveFolder + "\\" + "main-thumb.large.png";
string t_strSmallImage = t_strSaveFolder + "\\" + "main-thumb.small.png";

// Create instance
ThumbMakerClass t_xThumbMaker = new ACAWebThumbLib.ThumbMakerClass();

// Start convert web page http://www.acasystems.com to image
t_xThumbMaker.SetURL("http://www.acasystems.com");
t_xThumbMaker.StartSnap();

// Save the image with full size in C#
t_xThumbMaker.SaveImage(t_strLargeImage);

// Save the image with 320x240 in C#
t_xThumbMaker.SetThumbSize(320, 240, 0);
t_xThumbMaker.SaveImage(t_strSmallImage);

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 (2): How to capture web page to image with C# (C-sharp)?
  • C# Sample Code (3): How to generate image from HTML 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?
  • FAQ: How to convert HTML to image with PHP?
  • ACA WebThumb ActiveX Interface Reference
  • Free Download ACA WebThumb ActiveX Control
  • Wikipedia.org: C Sharp(C#)
  • Microsoft MSDN: Visual C# Developer Center

  • Get discount alerts, new product information and technical articles:
    Name:
    Email:
    * Get 10% off your first order by joining our mailing list!
    * You may safely unsubscribe at any time!