answersLogoWhite

0

To add "HTML to image" feature in your desktop program or web application, you can try ACA WebThumb ActiveX:

http://www.acasystems.com/en/web-thumb-activex/

It can be used with many programming languages and popular server side script languages like Visual C++ , Visual Basic, Delphi, C#, Java, ASP, ASP.Net, PHP and Perl etc..

1. PHP Sample Code: Convert HTML to image with PHP:

$t_xMaker = new COM('ACAWebThumb.ThumbMaker') or die("Start ACAWebThumb.ThumbMakerfailed");

$t_xMaker->SetURL("http://www.acasystems.com");

if ( 0 == $t_xMaker->StartSnap() )

{

// Capture HTML to image successful, call SetImageFile() to save the image.

echo "Take screenshot successful." ;

$t_xMaker->SaveImage("c:/acasystems.png");

}

?>

2. ASP Sample Code: Convert HTML to image with ASP:

<%

set t_xThumbMaker = server.createobject("ACAWebThumb.ThumbMaker")

t_xThumbMaker.SetURL ("http://www.acasystems.com")

if 0 = t_xThumbMaker.StartSnap() then

' Save the image with full size

t_xThumbMaker.SaveImage("acasystems.png")

end if

%>

3. C# Sample Code: Convert HTML to image with C#

// Set the image filename.

string t_strSaveFolder = Server.MapPath("./");

string t_strLargeImage = t_strSaveFolder + "" + "main-thumb.large.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);

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

How do you convert GIFF image to HTML?

You cannot convert an image to a markup file.


How do you convert image to HTML code?

In general you don't. You can convert an image into ASCII art using tools like the PNM suite, if that's what you mean; then you just need to stick &lt;pre&gt; &lt;/pre&gt; tags around the converted image.


How do I upload an image I have and use the HTML code but the image doesn't show What did I do wrong?

You should check your folder hierarchy and verify that all the HTML/xHTML code is correct. You can use an image editor to ensure the HTML code is correct.


What will be the HTML syntax of the image after copying it to a CD?

An image does not have an HTML syntax. If you copy an image from a Webpage, you save just the image file (e.g. image.jpg). You do not save any of the HTML code used to tell the browser where to locate the image to display on the page.


How do you convert HTML controls to image?

I don't understand fully what you mean... Do you mean how do you use HTML to add an image to your site?If you do then:1. Type the following:


How do you upload an image in HTML code?

First add image (.jpg, .png, .gif) into 'images' folder in main root of the site. In HTML code add &lt;img alt="word or phrase describing image" height="162" src="path where image is coming from images/img.gif" width="917" /&gt;


How do you upload an image to a HTML document?

To put an image in an HTML document, first upload the image to a web server somewhere. Then, copy the URL of the document. Finally, place the following code into the HTML document: &lt;image src="PASTE URL HERE" /&gt;


How do you use images in HTML?

HTML has a markup tag to tell the browser where to find an image for viewing. If the image is not in the same directory as your HTML file, you need to give the browser enough information to locate the image. Here is an example of HTML code to display an image: &lt;img src="image.jpg" width="100" height="100" alt="My Image" /&gt;.


How do you convert HTML into BBC code?

Try this online code converter http://www.seabreezecomputers.com/html2bbcode/


How do you control image length and width in HTML?

You can contro the image's length and width in HTML by using the following code:Note: The ? indicates the number you coose. The "?" indicates the location of the image you wish to select.


Convert a .jpg to a .HTML?

Show extensions and then click in the name box and change .jpg to .html you will then be able to open your image file with your internet browser.


How do you convert image file to byte code in asp with example code?

How to convert bytecode to .jpeg file in servlet? Thanks