Archive for March, 2007

Is there a way to change the compression to fax using HtmlCapture?

Tuesday, March 20th, 2007

Yes, please use SetTiffEncoder() function to change fill encoding method. Following encoder are supported.
HCTE_AUTO HtmlCapture will choose tiff encoder automatically.
HCTE_NONE Images will not be compressed when saving as tiff.
HCTE_CCITTRLE CCITT modified Huffman RLE.
HCTE_CCITTFAX3 CCITT Group 3 fax encoding.
HCTE_CCITTFAX4 CCITT Group 4 fax encoding.
HCTE_LZW Lempel-Ziv & Welch algorithm. This is the default value for ISnapShooter::TiffEncoder.
HCTE_OJPEG OJPEG encoding.
HCTE_JPEG JPEG encoding.

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

Monday, March 19th, 2007

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