ACASystems.com: Provide state-of-the-art image capture, screen capture, video capture and audio capture software
Provides screen capture, video capture and audio capture software
ACA WebThumb ActiveX Online Help
Take the screenshot from a web page in your desktop or web application, add "HTML to image", "HTML to PNG", "HTML to JPG" feature to your application with a few function calls!

Free Download Purchase

IThumbMaker Interface Reference: Function Documentation

StartSnap

Start the snap job.

  • Syntax
  • long StartSnap ();

  • Return Value
  • If the function succeeds, the return value is zero.

    If the function fails, the return value is nonzero.

    It may return one of the following values:

    Error codeDescription
    0Return successful
    1The snap process is time out. You can call function SetTimeOut to set the time out value.
    2The trial version is expired. You should visit http://www.acasystems.com to purchase a license, and then call SetRegInfo() before calling StartSnap()
    3The network or website errors.
  • Remarks
  • The function StartSnap navigates a hidden WebBrowser to open the specified URL and takes a snapshot for the web page. You must call function SetURL() to set the URL to be taken snapshot before call StartSnap.

    You can call function SaveImage() to save the image to the local file after function StartSnap succeeds.

  • Example
  • An example for VC++:

    void SnapExample()
    {
      HRESULT hr;
      IThumbMaker * t_xpMaker = NULL;
      // Initializes the COM library on the current thread
      CoInitialize(NULL); 
    
      hr = CoCreateInstance(
        __uuidof(ThumbMaker), NULL, CLSCTX_INPROC_SERVER, 
        __uuidof(IThumbMaker), (void**)&t_xpMaker
        );
    
      if ( SUCCEEDED(hr)  )
      {
        long t_lRet = 0;
        t_xpMaker->SetURL( _T("http://www.acasystems.com") );
        t_lRet = t_xpMaker->StartSnap();
        if ( 0 == t_lRet )
        {
          // Snap successful, call SaveImage() to save the image, and then call 
          // WIN32 API ShellExecute() to open the image by default image viewer.
          t_xpMaker->SaveImage( _T("c:/acasystems.png") );
          ShellExecute( NULL, _T("open"), _T("c:/acasystems.png"), NULL, NULL, SW_SHOW);
        }
        t_xpMaker->Release();
      }
    }
    

    An example for PHP:

    <?php
      $t_xMaker = new COM('ACAWebThumb.ThumbMaker')
        or die("Start ACAWebThumb.ThumbMakerfailed");
    
      $t_xMaker->SetURL("http://www.acasystems.com"); 
      if ( 0 == $t_xMaker->StartSnap() )
      {
        // Snap successful, call SetImageFile() to save the image.
        echo "Take screenshot successful." ;
        $t_xMaker->SaveImage("c:/acasystems.png");
      }
    ?>
    

To Top | To Class Index

SetURL

Set the URL for the web page to be taken snapshot.

  • Syntax
  • void SetURL(
      string strURL
      );
    
  • Parameters
  • strURL

      [in] The URL for the web page to be taken snapshot. It can be a HTTP webpage URL, also can be a local HTML file. For example: "http://www.acasystems.com" or "file:///C:/mytest.htm".

To Top | To Class Index

SetActiveXEnabled

Enable/Disable ActiveX controls on the web page.

  • Syntax
  • void SetActiveXEnabled (
      bool bEnable
      );
    
  • Parameters
  • bEnable

      [in] Boolean value that is true to enable ActiveX control on the web page.
  • Remarks
  • If the value is set to false, the ActiveX controls will not be executed.

    For security reason, the default value is false.


To Top | To Class Index

GetActiveXEnabled

Query whether ActiveX is enabled on the web page

  • Syntax
  • bool GetActiveXEnabled ();
  • Return Value
  • Boolean value that is true if the ActiveX control is enabled on the web page.

  • Remarks
  • If the value is set to false, the ActiveX controls will not be executed.

    For security reason, the default value is false.


To Top | To Class Index

SetJavaEnabled

Enable/Disable Java applets on the web page.

  • Syntax
  • void SetJavaEnabled (
      bool bEnable
      );
  • Parameters
  • bEnable

      [in] Boolean value that is true to enable Java applets on the web page.
  • Remarks
  • If the value is set to false, the Java applets will not be executed.

    For security reason, the default value is false.


To Top | To Class Index

GetJavaEnabled

Query whether Java applets is enabled on the web page.

  • Syntax
  • bool GetJavaEnabled ();
  • Return Value
  • Boolean value that is true if the Java applets is enabled on the web page.

  • Remarks
  • If the value is set to false, the Java applets will not be executed.

    For security reason, the default value is false.


To Top | To Class Index

SetJScriptEnabled

Enable/Disable JavaScript on the web page.

  • Syntax
  • void   	SetJScriptEnabled (
      bool bEnable
      );
  • Parameters
  • bEnable

      [in] Boolean value that is true to enable JavaScript on the web page.
  • Remarks
  • If the value is set to false, the JavaScript will not be executed.

    For security reason, the default value is false.


To Top | To Class Index

GetJScriptEnabled

Query whether JavaScript is enabled on the web page.

  • Syntax
  • bool GetJScriptEnabled ();
  • Return Value
  • Boolean value that is true if the JavaScript is enabled on the web page.

  • Remarks
  • If the value is set to false, the JavaScript will not be executed.

    For security reason, the default value is false.


To Top | To Class Index

SetImageEnabled

Enable/Disable image elements on the web page.

  • Syntax
  • void   	SetImageEnabled (
      bool bEnable
      );
  • Parameters
  • bEnable

      [in] Boolean value that is true to enable image elements on the web page.
  • Remarks
  • If the value is set to false, the images will not be shown.

    The default value is true.


To Top | To Class Index

GetImageEnabled

Query whether image elements is enabled on the web page.

  • Syntax
  • bool GetImageEnabled ();
  • Return Value
  • Boolean value that is true if the image elements is enabled on the web page.

  • Remarks
  • If the value is set to false, the images will not be shown.

    The default value is true.


To Top | To Class Index

SetVideoEnabled

Enable/Disable Video on the web page.

  • Syntax
  • void SetVideoEnabled (
      bool bEnable
      );
  • Parameters
  • bEnable

      [in] Boolean value that is true to enable video on the web page.
  • Remarks
  • If the value is set to false, the video on the web page will not be downloaded and played.

    For security reason, the default value is false.


To Top | To Class Index

GetVideoEnabled

Query whether Video is enabled on the web page.

  • Syntax
  • bool GetVideoEnabled ();
  • Return Value
  • Boolean value that is true if the video is enabled on the web page.

  • Remarks
  • If the value is set to false, the video on the web page will not be downloaded and played.

    For security reason, the default value is false.


To Top | To Class Index

SetBrowserSize

Set the size of the hidden web browser window.

  • Syntax
  • void SetBrowserSize (
      long lWidth,
      long lHeight
      );
  • Parameters
  • lWidth

      [in] The width of the hidden web browser window.

    lHeight

      [in] The height of the hidden web browser window.
  • Remarks
  • The default size of the web browser window is 1024x768.

  • Example
  • An example for VC++:

    void SnapExample()
    {
      HRESULT hr;
      IThumbMaker * t_xpMaker = NULL;
      // Initializes the COM library on the current thread
      CoInitialize(NULL); 
    
      hr = CoCreateInstance(
        __uuidof(ThumbMaker), NULL, CLSCTX_INPROC_SERVER, 
        __uuidof(IThumbMaker), (void**)&t_xpMaker
        );
    
      if ( SUCCEEDED(hr)  )
      {
        long t_lRet = 0;
        t_xpMaker->SetURL( _T("http://www.acasystems.com") );
        t_xpMaker->SetBrowserSize(800, 600); // Set browser size to 800x600
        t_lRet = t_xpMaker->StartSnap();
        if ( 0 == t_lRet )
        {
          // Snap successful, call SetImageFile() to save the image, and then call 
          // WIN32 API ShellExecute() to open the image by default image viewer.
          t_xpMaker->SaveImage( _T("c:/acasystems.png") );
          ShellExecute( NULL, _T("open"), _T("c:/acasystems.png"), NULL, NULL, SW_SHOW);
        }
        t_xpMaker->Release();
      }
    }
    

    An example for PHP:

    <?php
      $t_xMaker = new COM('ACAWebThumb.ThumbMaker')
        or die("Start ACAWebThumb.ThumbMakerfailed");
    
      $t_xMaker->SetURL("http://www.acasystems.com"); 
      $t_xMaker->SetBrowserSize(800, 600); // Set browser size to 800x600
      if ( 0 == $t_xMaker->StartSnap() )
      {
        // Snap successful, call SetImageFile() to save the image.
        echo "Take screenshot successful." ;
        $t_xMaker->SaveImage("c:/acasystems.png");
        echo "Take screenshot successful. "; 
      }
    ?>
    

To Top | To Class Index

GetBrowserWidth

Get the width of the hidden web browser window.

  • Syntax
  • long GetBrowserWidth();
  • Return Value
  • The width of the hidden web browser window.

  • Remarks
  • The default size of the web browser window is 1024x768.


To Top | To Class Index

GetBrowserHeight

Get the Height of the hidden web browser window.

  • Syntax
  • long GetBrowserHeight();
  • Return Value
  • The height of the hidden web browser window.

  • Remarks
  • The default size of the web browser window is 1024x768.


To Top | To Class Index

SetTimeOut

Set the time out value in seconds for function StartSnap.

  • Syntax
  • void SetTimeOut(
      long lTimeOut
      );
    
  • Parameters
  • lTimeOut

      [in] A long integer that specifies the number of seconds. If this is reached, the function StartSnap returns failed. If the lTimeOut is set to zero, no time limit is imposed.
  • Remarks
  • The default timeout value is 120 seconds.


To Top | To Class Index

GetTimeOut

Get the timeout value in seconds for function StartSnap.

  • Syntax
  • long GetTimeOut();
  • Return Value
  • The timeout value in seconds.

  • Remarks
  • The default timeout value is 120 seconds. If the timeout value is set to zero, no time limit is imposed.


To Top | To Class Index

SetDelayTime

Specifies the delay time value for StartSnap function, in milliseconds.

  • Syntax
  • void SetDelayTime(
      long lDelayTime
      );
    
  • Parameters
  • lDelayTime

      [in] A long integer that specifies the delay time in milliseconds.
  • Remarks
  • The default delay time value is zero.

    If you want to take snapshot from the web page that including the video(e.x. YouTube video), you should call SetDelayTime to specify a delay time for loading the video.


To Top | To Class Index

GetDelayTime

Get the delay time value for StartSnap function, in milliseconds.

  • Syntax
  • long GetDelayTime();
  • Return Value
  • The delay time in milliseconds.

  • Remarks
  • The default delay time value is zero.


To Top | To Class Index

SaveImage

Save an image as the specified type.

  • Syntax
  • bool SaveImage (
    string strSaveFile
    );
  • Parameters
  • strSaveFile

      [in] The file name for the image.
  • Return Value
  • If the function succeeds, the return value is true.

    If the function fails, the return value is false

  • Remarks
    1. Call this function to save the image using a specified name and type. the file name's file extension will be used to determine the image format. For example: "c:/mytest.jpg" or "c:/mytest.png".

    2. ACA WebThumb ActiveX Control supports for following image formats:

      • Raster image formats
        1. BMP
        2. JPG
        3. GIF
        4. PNG
        5. TIF
      • Vector image formats
        1. WMF
        2. EMF
    3. Note: If you call SaveImage() to save the web snapshots to local folder in web scripts like PHP, ASP, ASP.net, you should assign WRITE permission to the storage folder. More information, please visit
      http://www.acasystems.com/en/web-thumb-activex/faq-write-permission.htm
  • Example
  • An example for VC++:

    void SnapExample()
    {
      HRESULT hr;
      IThumbMaker * t_xpMaker = NULL;
      // Initializes the COM library on the current thread
      CoInitialize(NULL); 
    
      hr = CoCreateInstance(
        __uuidof(ThumbMaker), NULL, CLSCTX_INPROC_SERVER, 
        __uuidof(IThumbMaker), (void**)&t_xpMaker
        );
    
      if ( SUCCEEDED(hr)  )
      {
        long t_lRet = 0;
        t_xpMaker->SetURL( _T("http://www.acasystems.com") );
        t_lRet = t_xpMaker->StartSnap();
        if ( 0 == t_lRet )
        {
          // Snap successful, save image as .PNG format
          t_xpMaker->SaveImage( _T("c:/acasystems.png") );
          // Snap successful, save image as .JPG format
          t_xpMaker->SaveImage( _T("c:/acasystems.jpg") );
        }
        t_xpMaker->Release();
      }
    }
    

    An example for PHP:

    <?php
      $t_xMaker = new COM('ACAWebThumb.ThumbMaker')
        or die("Start ACAWebThumb.ThumbMakerfailed");
    
      $t_xMaker->SetURL("http://www.acasystems.com"); 
      if ( 0 == $t_xMaker->StartSnap() )
      {
        // Snap successful, save image as .PNG format
        $t_xMaker->SaveImage("c:/acasystems.png");
        // Snap successful, save image as .JPG format
        $t_xMaker->SaveImage("c:/acasystems.jpg");
        echo "Take screenshot successful. "; 
      }
    ?>
    

To Top | To Class Index

SetThumbSize

Set thumbnail image size.

  • Syntax
  • void SetThumbSize (
      long lWidth,
      long lHeight,
      long lRatioType
      );
  • Parameters
  • lWidth

      [in] The width of the thumbnail image.

      If lWidth and lHeight is set to zero, the image will be saved with full size.

      If lWidth is set to zero and lHeight is set to nonzero, the function will auto calculate the image width.

    lHeight

      [in] The height of the thumbnail image.

      If lWidth and lHeight is set to zero, the image will be saved with full size.

      If lHeight is set to zero and lWidth is set to nonzero, the function will auto calculate the image height.

    lRatioType

      [in] The width/height ratio type. 0: keep ratio by width; 1: keep ratio by height.

      If lWidth or lHeight is set to zero, this parameter will be ignored.

  • Remarks
  • The default thumbnail width and height is set to zero, the image will be saved with full size.

  • Example
  • An example for VC++:

    void SnapExample()
    {
      HRESULT hr;
      IThumbMaker * t_xpMaker = NULL;
      // Initializes the COM library on the current thread
      CoInitialize(NULL); 
    
      hr = CoCreateInstance(
        __uuidof(ThumbMaker), NULL, CLSCTX_INPROC_SERVER, 
        __uuidof(IThumbMaker), (void**)&t_xpMaker
        );
    
      if ( SUCCEEDED(hr)  )
      {
        long t_lRet = 0;
        t_xpMaker->SetURL( _T("http://www.acasystems.com") );
        t_lRet = t_xpMaker->StartSnap();
        if ( 0 == t_lRet )
        {
          // save image with full size
          t_xpMaker->SetThumbSize (0,0,0);
          t_xpMaker->SaveImage( _T("c:/acasystems_full.png") );
          // set image size to 320x240, keep ratio by width
          t_xpMaker->SetThumbSize (320,240,0);
          t_xpMaker->SaveImage( _T("c:/acasystems_320x240.png") );
          // set image width to 320, auto calculate the image height.
          t_xpMaker->SetThumbSize (320,0,0);
          t_xpMaker->SaveImage( _T("c:/acasystems_320xauto.png") );
          // set image height 240, auto calculate the image width.
          t_xpMaker->SetThumbSize (0,240,0);
          t_xpMaker->SaveImage( _T("c:/acasystems_autox240.png") );
        }
        t_xpMaker->Release();
      }
    }
    

    An example for PHP:

    <?php
      $t_xMaker = new COM('ACAWebThumb.ThumbMaker')
        or die("Start ACAWebThumb.ThumbMaker failed");
    
      $t_xMaker->SetURL("http://www.acasystems.com"); 
      if ( 0 == $t_xMaker->StartSnap() )
      {
        // save image with full size
        $t_xMaker->SetThumbSize (0,0,0);
        $t_xMaker->SaveImage( "c:/acasystems_full.png") ;
        // set image size to 320x240, keep ratio by width
        $t_xMaker->SetThumbSize (320,240,0);
        $t_xMaker->SaveImage( "c:/acasystems_320x240.png");
        // set image width to 320, auto calculate the image height.
        $t_xMaker->SetThumbSize (320,0,0);
        $t_xMaker->SaveImage( "c:/acasystems_320xauto.png");
        // set image height 240, auto calculate the image width.
        $t_xMaker->SetThumbSize (0,240,0);
        $t_xMaker->SaveImage( "c:/acasystems_autox240.png");
        echo "Take screenshot successful. "; 
      }
    ?>
    

To Top | To Class Index

GetThumbWidth

Get the width value of the thumbnail image.

  • Syntax
  • long GetThumbWidth();
  • Return Value
  • The real width of thumbnail image.


To Top | To Class Index

GetThumbHeight

Get the height value of the thumbnail image.

  • Syntax
  • long GetThumbHeight();
  • Return Value
  • The real height of thumbnail image.


To Top | To Class Index

GetThumbRatioType

Get the ratio type value of the thumbnail image.

  • Syntax
  • long GetThumbRatioType();
  • Return Value
  • The ratio type value of the thumbnail image. 0: keep ratio by width; 1: keep ratio by height.


To Top | To Class Index

SetBPP

Set the number of bits-per-pixel in the image.

  • Syntax
  • void SetBPP(
      long lBPP
      );
  • Parameters
  • lBPP

      [in] Specifies the number of bits-per-pixel in the image. This member must be one of the following value: 1, 4, 8, 16, 24, 32.
  • Remarks
  • The default BPP value is 32.


To Top | To Class Index

GetBPP

Get the number of bits-per-pixel in the image.

  • Syntax
  • long GetBPP();
  • Return Value
  • The number of bits-per-pixel in the image.

  • Remarks
  • The default BPP value is 32.


To Top | To Class Index

SetClipRect

Sets the coordinates of the specified clip rectangle to the image.

  • Syntax
  • void SetClipRect(
      long lLeft, 
      long lTop, 
      long lWidth, 
      long lHeight
      );
  • Parameters
  • lLeft

      [in] Specifies the x-coordinate.

    lTop

      [in] Specifies the y-coordinate.

    lWidth

      [in] Specifies the width of the clip rectangle.

    lHeight

      [in] Specifies the height of the clip rectangle.
  • Remarks
  • Sets the coordinates of the specified clip rectangle to the image. You can use this function to take a snapshot of a long HTML and break it up into multiple images.

  • Samples
  • ASP Sample: see {install folder}/sample/asp/clip-part.asp.

    PHP Sample: see {install folder}/sample/php/clip-part.php.


To Top | To Class Index

GetClipRect

Gets the coordinates of the specified clip rectangle to the image.

  • Syntax
  • void GetClipRect(
      long * lLeft, 
      long * lTop, 
      long * lWidth, 
      long * lHeight
      );
  • Parameters
  • lLeft

      [out] Get the x-coordinate.

    lTop

      [out] Get the y-coordinate.

    lWidth

      [out] Get the width of the clip rectangle.

    lHeight

      [out] Get the height of the clip rectangle.
  • Remarks
  • The default clip rectangle is (0, 0, 0, 0).


To Top | To Class Index

SetDPI

Set resolution(DPI) of the thumbnail image.

  • Syntax
  • void SetDPI (
      long lDPIx,
      long lDPIy
      );
  • Parameters
  • lDPIx

      [in] Specifies the horizontal resolution in dots-per-inch.

    lDPIy

      [in] Specifies the vertical resolution in dots-per-inch.
  • Remarks
  • The default DPI value is set to 96x96.


To Top | To Class Index

GetDPIx

Get the horizontal resolution of the thumbnail image.

  • Syntax
  • long GetDPIx();
  • Return Value
  • the horizontal resolution of the thumbnail image, in dots-per-inch.


To Top | To Class Index

GetDPIy

Get the p>resolution of the thumbnail image.

  • Syntax
  • long GetDPIx();
  • Return Value
  • the resolution of the thumbnail image, in dots-per-inch.


To Top | To Class Index

GetBitmapHandle

Get the HBITMAP handle of the thumbnail image.

  • Syntax
  • long GetBitmapHandle();
  • Return Value
  • If the function succeeds, the return value is the HBITMAP handle of the thumbnail image.

    If the function failes, the return value is NULL.

  • Remarks
  • Call this function after function StartSnap succeeds.

    When you no longer need the bitmap, call the DeleteObject WINAPI function to delete it.

  • Example
  • An example for VC++:

    void SnapExample()
    {
      HRESULT hr;
      IThumbMaker * t_xpMaker = NULL;
      // Initializes the COM library on the current thread
      CoInitialize(NULL); 
    
      hr = CoCreateInstance(
        __uuidof(ThumbMaker), NULL, CLSCTX_INPROC_SERVER, 
        __uuidof(IThumbMaker), (void**)&t_xpMaker
        );
    
      if ( SUCCEEDED(hr)  )
      {
        long t_lRet = 0;
        t_xpMaker->SetURL( _T("http://www.acasystems.com") );
        t_lRet = t_xpMaker->StartSnap();
        if ( 0 == t_lRet )
        {
          // Snap successful, call GetBitmapHandle() to get the HBITMAP handle 
          HBITMAP t_hBMP = (HBITMAP)t_xpMaker->GetBitmapHandle();
          if ( NULL != t_hBMP )
          {
            // TODO: Add your codes here ...
            // ....
    
            // Delete the handle
            DeleteObject(t_hBMP);
          }
        }
        t_xpMaker->Release();
      }
    }
    

To Top | To Class Index

GetImageBytes

Get the image memory-bytes of the thumbnail image.

  • Syntax
  • byte[] GetBitmapHandle(
      string strImageFormat
      );
  • Parameters
  • strImageFormat

      [in]

      Specifies the image format. For example: "png", "jpg", "gif".

      ACA WebThumb ActiveX Control supports for following image formats:

      • Raster image formats
        1. BMP
        2. JPG
        3. GIF
        4. PNG
        5. TIF
      • Vector image formats
        1. WMF
        2. EMF
  • Return Value
  • A bytes array contains the image data.

  • Remarks
  • Call this function after function StartSnap succeeds.

  • Example
  • An example for PHP:

    <?php
    // This sample script shows how to make a web thumbnial in the memory and output to client browser.
    // 
    // Parameters:
    //   url: The URL that you want to capture.
    //   width: The thumbnail width
    //   height: The thumbnail height
    //   ratiotype: The width/height ratio type. 0: keep ratio by width; 1: keep ratio by height.
    //
    // Example:
    //   <img src="onlinethumb.php?url=http://www.google.com"> or
    //   <img src="onlinethumb.php?url=http://www.google.com&width=320&height=240&ratiotype=0">
    
    // set the output header.
    header("Content-type: image/png");
    
    // Create instance ACAWebThumb.ThumbMaker
    $t_xMaker = new COM("ACAWebThumb.ThumbMaker")
      or die();
    
    // Get the parameters
    $t_strURL = isset($_GET["url"]) ? $_GET["url"] : "http://www.google.com";
    $t_iWidth = isset($_GET["width"]) ? $_GET["width"] : 320;
    $t_iHeight = isset($_GET["height"]) ? $_GET["height"] : 240;
    $t_iRatioType = isset($_GET["ratiotype"]) ? $_GET["ratiotype"] : 0;
    
    // Set the URL and start snap
    $t_xMaker->SetURL($t_strURL); 
    if ( 0 == $t_xMaker->StartSnap() )
    {
      // snap successful, set the thumbnail size and get image bytes
      $t_xMaker->SetThumbSize ($t_iWidth, $t_iHeight, $t_iRatioType);
      $t_arrBytes = $t_xMaker->GetImageBytes ("png");
      
      // output the image bytes to client
      if ( count($t_arrBytes) > 0 )
      {
        foreach($t_arrBytes as $byte) 
          echo chr($byte);
      }
    }
    ?>
    

To Top | To Class Index

GetJpegQuality

Get the quality level of the JPEG image.

  • Syntax
  • long GetJpegQuality();
  • Return Value
  • Return the JPEG quality level. A quality level of 0 corresponds to the greatest compression(worst quality), and a quality level of 100 corresponds to the least compression(best quality).


To Top | To Class Index

SetJpegQuality

Specify the quality level when you save a JPEG image.

  • Syntax
  • void SetJpegQuality(
      LONG lQuality
      );
  • Parameters
  • lQuality

      [in] Specify the quality level. A quality level of 0 corresponds to the greatest compression(worst quality), and a quality level of 100 corresponds to the least compression(best quality)
  • Remarks
  • The default value is set to 90.


To Top | To Class Index

SetTimestamp

Set a timestamp to the resulting thumbnail.

  • Syntax
  • void SetTimestamp (
      LONG lTimeFormat
      );
  • Parameters
  • lTimeFormat

      [in] Specify the timestamp format. It can be one of following values:
      0 - Disable timestamp
      1 - Time format: mm/dd/yyyy hh:mm:ss
      2 - Time format: dd-mm-yyyy hh:mm:ss
      3 - Time format: yyyy-mm-dd hh:mm:ss
  • Remarks
  • The default value is set to 0.

    Version require: >= 3.60


To Top | To Class Index

GetHTMLSource

Get the HTML source of the current web page.

  • Syntax
  • string GetHTMLSource();
  • Remarks
  • You should call this API after calling StartSnap() successfully.

    Version require: >= 4.00


To Top | To Class Index

SetHTMLSource

Write one or more HTML expressions to the current web page.

  • Syntax
  • void SetHTMLSource(string strHTMLSource);
  • Remarks
  • You should call this API before calling StartSnap(). The parameter of API SetURL() will be ignored once API SetHTMLSource() is called.

    Version require: >= 4.10

  • Example
  • An example for PHP:

    <?php
      $t_xMaker = new COM('ACAWebThumb.ThumbMaker')
        or die("Start ACAWebThumb.ThumbMakerfailed");
    
      $t_xMaker->SetHTMLSource("<H1>Test Title</H1> <p>This is a sample.</p>"); 
      if ( 0 == $t_xMaker->StartSnap() )
      {
        // Snap successful, call SetImageFile() to save the image.
        echo "Take screenshot successful." ;
        $t_xMaker->SaveImage("c:/mytest.png");
      }
    ?>
    

To Top | To Class Index

SetRegInfo

Set the registration information to remove the trial limit.

  • Syntax
  • void SetRegInfo(
      string strRegCode
      );
  • Parameters
  • strRegCode

      [in] The registration code, for example: "AAAAAAAAA-BBBBBBBBB-CCCCCCCCC-DDDDDDDDD". Once you purchase the component, a registration code will be sent to you by email.
  • Remarks
  • You should call this function to remove the trial limit before calling StartSnap().