Monthly Archives: July 2008

How to capture html to image on x64 windows

X64 windows is becoming more and more polular platform. Htmlsnapshot component has supported html to image on windows x64 platform along with the industry trend.

There are mainly four x64 windows: XP x64,  Vista X64, Windows 2003 x64, Windows 2008 X64.  The first two are client platform while the last two are server version.

To convert html to image on windows x64 platform, there are two ways:

1. Convert html to image with the 32 bit component. To do this, html to image function must run under a 32 bit process. By default, htmlsnapshot will register itself as 32 bit component on Windows X64/

For example, you can run the simple vbscript demo with 32 bit mode like this:

c:WindowsSysWOW64cscript.exe DemoVBScriptsimple.vbs

2. Convert html to image with native 64bit mode. Since IE has been ported to x64, so htmlsnapshot can capture html to image with 64 bit IE.  To do this, first you need to manual register the 64 bit htmlsnapshot. In the installation folder, run below command:

regsvr32 x64htmlsnap2.dll

Now, you can run the simple vbscript demo with 64bit mode like this:

c:Windowssystem32cscript.exe DemoVBScriptsimple.vbs

Another thing to notice is that in order to capture html page with flash to image, you has to use the 32 bit mode. The reason is that the flash player doesn’t have 64 bit version yet.  Adobe is still working on this. Please read: