How to save webpage to multi-page TIFF file with HtmlCapture V2.0?

To convert a webpage into multiple page TIFF image, please call CreateTiff() and AddImageToTiff() function of HtmlCapture ActiveX V2.0.

//create HtmlCapture
var snap = new ActiveXObject("HtmlCapture.SnapShooter");
snap.SetRegInfo("username", "regcode"); //set your reg code here
snap.SetRenderingEngine("firefox"); //set firefox as default rendering engine

snap.CreateTiff("snapshot.tif");

if(0 == snap.SnapUrl("http://www.google.com/"))
snap.AddImageToTiff(false);

if(0 == snap.SnapUrl("http://www.yahoo.com/"))
snap.AddImageToTiff(false);

if(0 == snap.SnapUrl("http://www.polestarsoft.com/"))
snap.AddImageToTiff(true);

snap.CloseTiff();

//release the object
snap = null

Leave a Reply

You must be logged in to post a comment.