ISnapShooter2 Interface Reference
[HtmlCapture ActiveX Control]

Main interface of HtmlCapture version 2.0 (contains all ISnapShooter functions) More...

List of all members.

Snap functions

Functions to take snapshots.

HtmlCaptureResult SnapUrl (string strUrl)
 Take a snapshot for the specified URL.
HtmlCaptureResult SnapHtmlString (string strHtml)
 Take a snapshot for html text.
HtmlCaptureResult ReSnap ()
 Repeat the last Snap operation (SnapUrl() or SnapHtmlString()).
HtmlCaptureResult SnapWebBrowser (IDispatch *pWebBrowser)
 Take snapshot for an existing web browser.
void Stop ()
 Cancel the snap job.

Image access functions

Functions to access the resulting image.

bool SaveImage (string strFileName)
 Save the snap's resulting image to a local file (image or PDF) after a snap function succeeds.
byte[] GetImageBytes (string strFormat)
 Get the in-memory image bytes after a snap function succeeds.
long GetBmpHandle ()
 Get the HBITMAP handle to the resulting image.
long GetEmfHandle ()
 Get the HENHMETAFILE handle to the resulting image.
bool SaveMultiPageTiff (string strFileName, long nPageHeight)
 Save the snap's resulting image to multi-page TIFF file after a snap function succeeds.
void GetImageSize (long *pWidth, long *pHeight)
 Get the size of resulting image.
void CreatePDF (string strFileName)
 Create a PDF document for adding snapshot image to.
void AddImageToPDF ()
 Add snap result to the PDF document created by CreatePDF() as a new page after a successful snap.
void ClosePDF ()
 Save and close the PDF document created by CreatePDF().
void CreateTiff (string strFileName)
 Create a Tiff document for adding snapshot image to.
void AddImageToTiff (bool bLastPage)
 Add snap result to the TIFF document created by CreateTiff() as a new page after a successful snap.
void CloseTiff ()
 Close the Tiff document created by CreateTiff().

Snap options

Get/set options that affects snap.

long GetTimeOut ()
 Get the time out value in milliseconds for snap functions.
void SetTimeOut (long nTimeOut)
 Set the time out value in milliseconds for snap functions.
long GetDelayTime ()
 Get the time value in milliseconds to wait for after a html document is downloaded.
void SetDelayTime (long nDelayTime)
 Set the time value in milliseconds to wait for after a html document is downloaded.
float GetZoomRatio ()
 Get the zoom ratio of the html page when taking snapshot.
void SetZoomRatio (float fZoomRatio)
 Set the zoom ratio of the html page when taking snapshot.
bool GetActiveXEnabled ()
 Get if ActiveX is enabled (visible) on a web page.
void SetActiveXEnabled (bool bEnabled)
 Set if ActiveX is enabled (visible) on a web page.
bool GetImageEnabled ()
 Get if images are enabled (visible) on a web page.
void SetImageEnabled (bool bEnabled)
 Set if images are enabled (visible) on a web page.
bool GetJavaEnabled ()
 Get if java applets are enabled on a web page.
void SetJavaEnabled (bool bEnabled)
 Set if java applets are enabled on a web page.
bool GetScriptEnabled ()
 Get if scripts are enabled (can be executed) on a web page.
void SetScriptEnabled (bool bEnabled)
 Set if scripts are enabled (can be executed) on a web page.
bool GetVideoEnabled ()
 Get if videos are enabled (visible) on a web page.
void SetVideoEnabled (bool bEnabled)
 Set if videos are enabled (visible) on a web page.
void GetMinBrowserSize (long *pWidth, long *pHeight)
 Get the minimum size of the hidden web browser window.
void SetMinBrowserSize (long nWidth, long nHeight)
 Set the minimum size of the hidden web browser window.
string GetStartupScript ()
 Get the JScript code to be executed before each Snap (after document downloaded).
void SetStartupScript (string strScript)
 Set the JScript code to be executed before each Snap (after document downloaded).
string GetCookies ()
 Get the cookies of the webpage just snapped.
void SetCookies (string strUrl, string strCookies)
 Set cookie(s) for the specified url.
void ClearCustomCookies ()
 Clear all the cookies set by SetCookies() call.
void SetAccessCredential (string strUsername, string strPassword)
 Set user name and password for snap requests to secure webpages.
void GetAccessCredential (string *strUsername, string *strPassword)
 Get the credential information currently set.
void SetProxy (string strHost, LONG nPort, string strUsername, string strPassword)
 Set up proxy server information.
void GetProxy (string *strHost, LONG *nPort, string *strUsername, string *strPassword)
 Get current proxy settings.
void SetPostData (string strPostData)
 Set post data.
string GetPostData ()
 Get the post data currently set.
void SetReferer (string strReferer)
 Set the REFERER HTML Header for snap requests.
string GetReferer ()
 Get the current REFERER HTML Header.
void SetUserAgent (string strUserAgent)
 Set USER AGENT string for HtmlCapture.
string GetUserAgent ()
 Get the USER AGENT string currently set.
void SetCustomHeaders (string strHeaders)
 Set custom HTTP headers for snap requests.
string GetCustomHeaders ()
 Get the custom HTTP headers currently set.
void SetRenderingEngine (string strEngine)
 Set the HTML rendering engine used by HtmlCapture.
string GetRenderingEngine ()
 Get the HTML rendering engine used by HtmlCapture.

Image access options

Get/set options that affects image access.

void GetClipRect (long *pLeft, long *pTop, long *pWidth, long *pHeight)
 Get the clip rect to the resulting image.
void SetClipRect (long nLeft, long nTop, long nWidth, long nHeight)
 Set the clip rect to the resulting image.
void GetThumbSize (long *pWidth, long *pHeight, bool *pKeepRatio)
 Get the preset thumbnail image size.
void SetThumbSize (long nWidth, long nHeight, bool bKeepRatio)
 Set thumbnail image size.
long GetBpp ()
 Get color depth of the resulting image.
void SetBpp (long nBpp)
 Set color depth of the resulting image.
void GetDPI (long *pDpiX, long *pDpiY)
 Get resolution for TIFF, JPEG, PNG and BMP image formats.
void SetDPI (long nDpiX, long nDpiY)
 Set resolution for TIFF, JPEG, PNG and BMP image formats.
byte GetJpegQuality ()
 Get JPEG quality when saving image as JPEG.
void SetJpegQuality (byte nQuality)
 Set JPEG quality when saving image as JPEG.
HtmlCaptureTiffEncoder GetTiffEncoder ()
 Get the TIFF encoder when saving image as TIFF format.
void SetTiffEncoder (HtmlCaptureTiffEncoder nEncoder)
 Set the TIFF encoder when saving image as TIFF format.
HtmlCaptureGifEncoder GetGifEncoder ()
 Get the GIF encoder when saving image as GIF format.
void SetGifEncoder (HtmlCaptureGifEncoder nEncoder)
 Set the GIF encoder when saving image as GIF format.
HtmlCaptureDitherMethod GetDitherMethod ()
 Get the dither method when converting image to B&W.
void SetDitherMethod (HtmlCaptureDitherMethod nMethod)
 Set the dither method when converting image to B&W.
long GetThreshold ()
 Get the threshold value for converting image to B&W.
void SetThreshold (long nThreshold)
 Set the threshold value for converting image to B&W.
bool GetErrorDiffusion ()
 Get if using error diffusion algorithm when decreasing Bpp .
void SetErrorDiffusion (bool bErrorDiff)
 Set if using error diffusion algorithm when decreasing Bpp .
bool GetOptimalPalette ()
 Get if using an optimal palette when decreasing Bpp .
void SetOptimalPalette (bool bOptimalPal)
 Set if using an optimal palette when decreasing Bpp .
bool GetGrayScale ()
 Get if converting resulting image to gray scale in the next SaveImage(), GetImageBytes() or GetBmpHandle() call.
void SetGrayScale (bool bGrayScale)
 Set if converting resulting image to gray scale in the next SaveImage(), GetImageBytes() or GetBmpHandle() call.
bool GetBlackAndWhite ()
 Get if converting resulting image to B&W in the next SaveImage(), GetImageBytes() or GetBmpHandle() call.
void SetBlackAndWhite (bool bBAndW)
 Set if converting resulting image to B&W in the next SaveImage(), GetImageBytes() or GetBmpHandle() call.
HtmlCaptureInterpolationMode GetInterpolationMode ()
 Get the interpolation mode when resizing an image.
void SetInterpolationMode (HtmlCaptureInterpolationMode nMode)
 Set the interpolation mode when resizing an image.
void SetMargins (long nLeft, long nTop, long nRight, long nBottom)
 Set the extra margins on the output image.
void GetMargins (long *nLeft, long *nTop, long *nRight, long *nBottom)
 Get the current extra margins values.
void SetMarginColor (byte nRed, byte nGreen, byte nBlue)
 Set the background color of the extra margin area created by SetMargins().
void GetMarginColor (byte *nRed, byte *nGreen, byte *nBlue)
 Get the current margin color value.

HTML utility functions

Some utility functions to retrieve information about the webpage.

string GetDocumentTitle ()
 Get the title of the web page just snapped.
string GetDocumentSource ()
 Get the html source of the web page just snapped.
string[] GetDocumentLinks ()
 Get the URLs of links on the web page just snapped.
string[] GetDocumentFrames ()
 Get the URLs of frames on the web page just snapped.
string GetDocumentText ()
 Get the text content of the web page just snapped.
IDispatch * GetHtmlDocument ()
 Get WebBrowser's html document dispatch interface.

Other functions



string SaveOptions ()
 Save all options (snap options and image access options) to a string.
void RestoreOptions (string strOptions)
 Restore all options (snap options and image access options) saved by calling SaveOptions().
variant GetAttributeValue (string strName)
 Get a named attribute value.
string GetReserved (string strIdx)
 Get reserved properties.
void SetReserved (string strIdx, string newVal)
 Set reserved properties.
void SetRegInfo (string strUserName, string strRegCode)
 Set registration info.


Detailed Description

Main interface of HtmlCapture version 2.0 (contains all ISnapShooter functions)

Member Function Documentation

HtmlCaptureResult SnapUrl ( string  strUrl  ) 

Take a snapshot for the specified URL.

The function navigates a hidden WebBrowser to the specified URL and takes a snapshot for the web page. The resulting image can be saved to file or copied to memory. To take a snapshot for a html string, call SnapHtmlString().

Parameters:
strUrl The URL of the web page to be taken snapshot. For example, http://www.polestarsoft.com or file:///C:/test.htm
Returns:
If the function succeeds, the return value is HCR_SUCCESS.
Return values other than HCR_SUCCESS indicates an error, see HtmlCaptureResult.
Remarks:
This function is a synchronous function, i.e., it blocks the execution of current thread until the snap is completed or failed. Instead of calling Sleep() Win32 API, this function runs a message loop to wait. So windows message can still be processed when SnapUrl() is executing. Call Stop() in a message handler to cancel the execution of SnapUrl() and its return value will be HCR_USER_INTERRUPT.

Once SnapUrl() succeeds, the resulting image can be accessed via calling the image access functions.
There are several options that affects the resulting image of SnapUrl(), and must be set before SnapUrl() call to take effects, see Snap options.
See also:
HtmlCaptureResult, Stop, SaveImage, GetImageBytes, SnapHtmlString

HtmlCaptureResult SnapHtmlString ( string  strHtml  ) 

Take a snapshot for html text.

The function is the same as SnapUrl() except that it takes html text as parameter, not URL. It operates entirely in memory, no temporary files used.

Parameters:
strHtml The string contains html text.
Returns:
If the function succeeds, the return value is HCR_SUCCESS.
Return values other than HCR_SUCCESS indicates an error, see HtmlCaptureResult.
See also:
HtmlCaptureResult, SnapUrl

HtmlCaptureResult ReSnap (  ) 

Repeat the last Snap operation (SnapUrl() or SnapHtmlString()).

Returns:
If the function succeeds, the return value is HCR_SUCCESS.
Return values other than HCR_SUCCESS indicate an error, see HtmlCaptureResult.
Remarks:
HtmlCapture saves the parameter of your last SnapUrl() or SnapHtmlString() call internal. This function equals to call SnapUrl(LASTURL) or SnapHtmlString(LAST_HTML_STRING).
See also:
HtmlCaptureResult, SnapUrl, SnapHtmlString

HtmlCaptureResult SnapWebBrowser ( IDispatch *  pWebBrowser  ) 

Take snapshot for an existing web browser.

Parameters:
pWebBrowser An IWebBrowser2 interface pointer of the existing web browser.
Returns:
If the function succeeds, the return value is HCR_SUCCESS, else HCR_SNAP_ERROR.
Remarks:
Once SnapWebBrowser() succeeds, the resulting image can be accessed via calling the image access functions.

This function works in different way from SnapUrl().
Note:
This function is for IE ONLY. If you SetRenderingEngine() to "FIREFOX", it will return an error.
See also:
SnapUrl

void Stop (  ) 

Cancel the snap job.

If SnapUrl(), SnapHtmlString() or ReSnap() is called and blocked, Stop() make them return at once.

Remarks:
Snap functions like SnapUrl(), SnapHtmlString() and ReSnap() run a message loop and block the execution of current thread. This function can be used to break the message loop and make Snap functions return at once. The return value of these snap functions will be HCR_USER_INTERRUPT if Stop() is called.
See also:
SnapUrl, SnapHtmlString, ReSnap

bool SaveImage ( string  strFileName  ) 

Save the snap's resulting image to a local file (image or PDF) after a snap function succeeds.

Parameters:
strFileName The image file name. Since this function uses the extension name to determine image format, it must end with an extension name, for example: "c:\snapshot1.jpg", "d:\snapshot.png", etc.
Returns:
If image is successfully saved, the return value is true, else false.
Remarks:
This function saves the snap image to a local file. Call this function when a snap function succeeds. To retrieve image data in memory, call GetImageBytes(). To get an HBITMAP or an HENHMETAFILE handle, call GetBmpHandle() and GetEmfHandle() respectively.

The following pseudo codes show how to take a snapshot for a URL and save it to local file.
 ISnapShooter2 snap;
 if (snap.SnapUrl("http://www.polestarsoft.com") == HCR_SUCCESS)
 {
     if(snap.SaveImage("c:\\snapshot.png"))
         MessageBox("Snapshot saved.");
 }

HtmlCapture Supports following image formats.

  • raster images
    • BMP
    • GIF
    • JPG
    • PCX
    • PNG
    • TGA
    • TIF
  • vector images
    • WMF
    • EMF
  • Other formats
    • PDF

Please make sure strFileName is ended with a valid extension name (listed above), or this function will fail.
There are several properties affects the saving of image, and must be set before calling SaveImage() to take effects. See Image access options.
By setting corresponding options, and call SaveImage(), you can get image in a clip rect, thumbnail image, gray scale image or B&W image, etc.
Note:
WMF & EMF formats are available for IE ONLY. If you SetRenderingEngine() to "FIREFOX", it will return an error.
See also:
GetImageBytes, GetBmpHandle, GetEmfHandle, SnapUrl, SnapHtmlString

byte [] GetImageBytes ( string  strFormat  ) 

Get the in-memory image bytes after a snap function succeeds.

In this way, you can convert html to image in memory.

Parameters:
strFormat A string that represents the image format. For example: "PNG", "WMF". For a list of image formats supported, see SaveImage.
Returns:
A bytes array contains the resulting image's in-memory data.
Remarks:
This function is similar to SaveImage(). The difference between these two functions is SaveImage() saves resulting image to a local file, while GetImageBytes() saves resulting image to a byte array.

There are several properties affects the saving of image, and must be set before calling SaveImage() to take effects. See Image access options.
Note:
WMF & EMF formats are available for IE ONLY. If you SetRenderingEngine() to "FIREFOX", it will return an error.
See also:
SaveImage, SnapUrl

long GetBmpHandle (  ) 

Get the HBITMAP handle to the resulting image.

Call this function after a snap function succeeds. The returned bitmap is also affected by those image access options. If you want them to take effects, set them before call this function.

Returns:
If this function succeeds, the return value is a HBITMAP handle. If the function fails, the return value is NULL.
Note:
If the return value is not NULL, you need to free the returned bitmap handle with DeleteObject Win32 API.
Remarks:
This function retrieves a HBITMAP handle (a GDI object). It can be used as a normal GDI object. If you want to get a HENHMETAFILE handle, call GetEmfHandle() instead.

The following pseudo codes show how to take a snapshot for a URL and draw it on a picture box.
 ISnapShooter2 snap;
 if (snap.SnapUrl("http://www.polestarsoft.com") == HCR_SUCCESS)
 {
     HBITMAP hbmp = (HBITMAP)snap.GetBmpHandle();
     if (hbmp != NULL)
     {
         pictureBox.SetBitmap(hbmp);    //picture box is a CStatic variable
         //we need not to call DeleteObject(hbmp), since pictureBox will delete it.
     }
 }

See also:
GetEmfHandle, SaveImage

long GetEmfHandle (  ) 

Get the HENHMETAFILE handle to the resulting image.

Call this function after a snap function succeeds. The returned meta file is also affected by those image access options. If you want them to take effects, set them before call this function.

Returns:
If this function succeeds, the return value is a HENHMETAFILE handle. If the function fails, the return value is NULL.
Remarks:
This function retrieves a HENHMETAFILE handle. Since EMF images are vector images, they can shrink and grow with no distortion. If you want to get a raster image handle, call GetBmpHandle() instead.

The following pseudo codes show how to take a snapshot for a URL and draw it on a window using GetEmfHandle().
 ISnapShooter2 snap;
 if (snap.SnapUrl("http://www.polestarsoft.com") == HCR_SUCCESS)
 {
     HENHMETAFILE hemf = (HENHMETAFILE)snap.GetEmfHandle();
     if (hemf != NULL)
     {
         CRect rc;
         GetClientRect(&rc);            //get client rect of this window
         CDC* pDC = GetDC();            //get drawing context
         PlayEnhMetaFile(pDC->m_hDC, hemf, &rc);        //draw it
         DeleteEnhMetafile(hemf);
     }
 }
Note:
  • If the return value is not NULL, you need to free the returned meta file with DeleteEnhMetafile Win32 API.
  • This function is for IE ONLY. If you SetRenderingEngine() to "FIREFOX", it will return NULL.
See also:
GetBmpHandle, SaveImage

bool SaveMultiPageTiff ( string  strFileName,
long  nPageHeight 
)

Save the snap's resulting image to multi-page TIFF file after a snap function succeeds.

If the resulting image's height is greater than nPageHeight, it will be split into several pages and added to a multi-page TIFF file.

Parameters:
strFileName The image file name.
nPageHeight Max height of a TIFF page.
Returns:
If image is successfully saved, the return value is true, else false.
See also:
SnapUrl, SaveImage, SetTiffEncoder

void GetImageSize ( long *  pWidth,
long *  pHeight 
)

Get the size of resulting image.

Call this function after a snap function succeeds.

Parameters:
pWidth A pointer to retrieve image width.
pHeight A pointer to retrieve image height.
See also:
SnapUrl, SaveImage

void CreatePDF ( string  strFileName  ) 

Create a PDF document for adding snapshot image to.

Parameters:
strFileName Filename of the PDF document
Remarks:
To save a snapshot result to a PDF document, there are two methods:

Note:
ClosePDF() must be called to save the PDF file.
See also:
ClosePDF, AddImageToPDF

void AddImageToPDF (  ) 

Add snap result to the PDF document created by CreatePDF() as a new page after a successful snap.

Remarks:
See CreatePDF() for an example.
See also:
CreatePDF, ClosePDF

void ClosePDF (  ) 

Save and close the PDF document created by CreatePDF().

Remarks:
If no page was added to the PDF document, this function will create a blank page of of 800x600 in size. See CreatePDF() for an example.
See also:
CreatePDF, AddImageToPDF

void CreateTiff ( string  strFileName  ) 

Create a Tiff document for adding snapshot image to.

This function operates like CreatePDF() except that it handles TIFF document.

Parameters:
strFileName Filename of the TIFF document
Remarks:
To save a snapshot result to a TIFF document, there are two methods:

Note:
CloseTiff() must be called to save the TIFF file.
See also:
CloseTiff, AddImageToTiff

void AddImageToTiff ( bool  bLastPage  ) 

Add snap result to the TIFF document created by CreateTiff() as a new page after a successful snap.

Remarks:
See CreateTiff() for an example.
See also:
CreateTiff, CloseTiff

void CloseTiff (  ) 

Close the Tiff document created by CreateTiff().

Remarks:
If no page was added to the PDF document, this function will create a blank page of of 800x600 in size. See CreateTiff() for an example.
See also:
CreateTiff, AddImageToTiff

long GetTimeOut (  ) 

Get the time out value in milliseconds for snap functions.

TimeOut property can be used to avoid hang.

Returns:
TimeOut value in milliseconds. The default TimeOut value is 30000.
See also:
SetTimeOut

void SetTimeOut ( long  nTimeOut  ) 

Set the time out value in milliseconds for snap functions.

TimeOut property can be used to avoid hang.

Parameters:
nTimeOut TimeOut value in milliseconds. A negative value or zero indicates infinite.
Remarks:
A snap call will return HCR_TIMEOUT if the snap is still not completed after TimeOut milliseconds from its startup. You can call SetTimeOut() with nTimeOut=-1 to disable TimeOut, then snap functions will not return until it completes or fails.
See also:
GetTimeOut

long GetDelayTime (  ) 

Get the time value in milliseconds to wait for after a html document is downloaded.

Sometimes, a web page contains ActiveX or java applet, which takes time to initialize.

Returns:
time value in milliseconds to wait for after a html document is downloaded. Default value is 1000
See also:
SetDelayTime

void SetDelayTime ( long  nDelayTime  ) 

Set the time value in milliseconds to wait for after a html document is downloaded.

Sometimes, a web page contains ActiveX or java applet, which takes time to initialize.

Parameters:
nDelayTime Time value in milliseconds to wait for after a html document is downloaded. Default value is 1000
See also:
GetDelayTime

float GetZoomRatio (  ) 

Get the zoom ratio of the html page when taking snapshot.

Default value is 1.0.

Returns:
A float value indicates the zoom ratio.
See also:
SetZoomRatio

void SetZoomRatio ( float  fZoomRatio  ) 

Set the zoom ratio of the html page when taking snapshot.

Default value is 1.0.

Parameters:
fZoomRatio A float value indicates the zoom ratio.
Remarks:
  • If fZoomRatio<1, it will result in a small image
  • If fZoomRatio>1, it will result in a large image.
  • If fZoomRatio<0, the function fails.

One of the differences between SetZoomRatio(), SetThumbSize(), and SetClipRect() is SetZoomRatio() affects snap functions (e.g. SnapUrl()), while SetThumbSize() and SetClipRect() only affect image access functions (e.g. SaveImage()).

Thus SetZoomRatio() has to be called before calling snap functions, while SetThumbSize() and SetClipRect() have to be called before calling image access functions to take effects.

The orders of these properties taking effect on the snap result are: ZoomRatio > ClipRect > Margins > ThumbSize. If you call SetZoomRatio() several times before a snap call, only the last one takes effect.
See also:
GetZoomRatio, SetThumbSize, SetClipRect, SetMargins, SnapUrl, SaveImage

bool GetActiveXEnabled (  ) 

Get if ActiveX is enabled (visible) on a web page.

Default value is TRUE.

See also:
SetActiveXEnabled

void SetActiveXEnabled ( bool  bEnabled  ) 

Set if ActiveX is enabled (visible) on a web page.

Default value is TRUE.
If ActiveXEnabled is set to FALSE, then ActiveX controls on a web page will not be downloaded, which is useful to decrease download time, so as to decrease snap time.

Note:
This function is for IE ONLY. It has no effect on Firefox rendering engine.
See also:
GetActiveXEnabled

bool GetImageEnabled (  ) 

Get if images are enabled (visible) on a web page.

Default value is TRUE.

See also:
SetImageEnabled

void SetImageEnabled ( bool  bEnabled  ) 

Set if images are enabled (visible) on a web page.

Default value is TRUE.
If ImageEnabled is set to FALSE, images on a web page will not be downloaded and displayed, which is useful to decrease downloading time, so as to decrease snap time.

See also:
GetImageEnabled

bool GetJavaEnabled (  ) 

Get if java applets are enabled on a web page.

Default value is TRUE.

See also:
SetJavaEnabled

void SetJavaEnabled ( bool  bEnabled  ) 

Set if java applets are enabled on a web page.

Default value is TRUE.
If JavaEnabled is set to FALSE, java applets on a web page will not be downloaded, which is useful to decrease downloading time, so as to decrease snap time.

Note:
This function is for IE ONLY. It has no effect on Firefox rendering engine.
See also:
GetJavaEnabled

bool GetScriptEnabled (  ) 

Get if scripts are enabled (can be executed) on a web page.

Default value is TRUE.

See also:
SetScriptEnabled

void SetScriptEnabled ( bool  bEnabled  ) 

Set if scripts are enabled (can be executed) on a web page.

Default value is TRUE.

Note:
If ScriptEnabled is set to FALSE, No scripts on a web page will be executed. This may lead to a disordered image.
See also:
GetScriptEnabled

bool GetVideoEnabled (  ) 

Get if videos are enabled (visible) on a web page.

Default value is TRUE.

See also:
SetVideoEnabled

void SetVideoEnabled ( bool  bEnabled  ) 

Set if videos are enabled (visible) on a web page.

Default value is TRUE.
If VideoEnabled is set to FALSE, videos on a web page will not be downloaded and displayed, which is useful to decrease downloading time, so as to decrease snap time.

Note:
This function is for IE ONLY. It has no effect on Firefox rendering engine.
See also:
GetVideoEnabled

void GetMinBrowserSize ( long *  pWidth,
long *  pHeight 
)

Get the minimum size of the hidden web browser window.

Parameters:
pWidth A pointer to retrieve minimum width in pixels. Default value is 800.
pHeight A pointer to retrieve minimum height in pixels. Default value is 600.
See also:
SetMinBrowserSize

void SetMinBrowserSize ( long  nWidth,
long  nHeight 
)

Set the minimum size of the hidden web browser window.

Parameters:
nWidth Minimum width in pixels. Default value is 800.
nHeight Minimum height in pixels. Default value is 600.
Remarks:
This function affects the size of resulting image. Taking no account of SetZoomRatio(), SetClipRect() and SetThumbSize(), the resulting image size: SizeOfImage = MAX( MinBrowserSize, WebPageSize ).

Set MinBrowserSize to (0, 0) will make MinBrowserSize take no effects.
See also:
GetMinBrowserSize

string GetStartupScript (  ) 

Get the JScript code to be executed before each Snap (after document downloaded).

Returns:
The startup JScript code.
See also: