ZennoLab Assemblies Documentation
GetPagePreview Method
Example 
ZennoLab.CommandCenter Namespace > Tab Class : GetPagePreview Method
Gets preview of page.
Syntax
public string GetPagePreview()

Return Value

Type: System.String

The image as a string value.

Remarks
The preview size does not exceed 2000 * 2000 pixels.
Example
The following code example demonstrates uses of the GetPagePreview method
// get page preview
var preview = instance.ActiveTab.GetPagePreview();
var ms = new System.IO.MemoryStream(Convert.FromBase64String(preview));
var bmp = new Bitmap(ms);
ms.Close();
// save to image
bmp.Save("example.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);
// get page preview
$preview = $instance->ActiveTab->GetPagePreview();
$ms = new System\IO\MemoryStream(System\Convert::FromBase64String($preview));
$bmp = new System\Drawing\Bitmap($ms);
$ms->Close();
// save to image
$bmp->Save("example.jpg", System\Drawing\Imaging\ImageFormat::Jpeg);
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

Tab Class
Tab Members
GetSourceText Method