Initialize Method

The Initialize method initializes a thumbnail control with a reference to the PDF control that it will reflect from that point onwards.

Syntax

C++:

HRESULT Initialize([in] IDispatch *pDispatch)

C#:

void Initialize ( object pDispatch)

VB:

Sub Initialize (pDispatch As Object)

Parameters

pDispatch

This holds a reference to the Amyuni CreactiveX PDF control that will be associated with this thumbnail control.

 

Example in C#:

The following example shows the initialization of the Creator control and the thumbnail control in the constructor of a Windows form.

 

// Declaration of the two variables:

// private AxACPDFCREACTIVEX.AxPDFCreactiveX pdfCtrl;

// private AxACPDFCREXTLib.AxacThumbnailCtrl thumbCtrl;

public ThumDemoForm()

{

InitializeComponent();

pdfCtrl.SetLicenseKey(Lic.GetLicenseOwner(), Lic.GetLicenseKey());

// Open a sample PDF file into the creator control.

pdfCtrl.Open( @".\files\PageCount.pdf", "" );

pdfCtrl.ZoomFactor = 50;

// This will cause the thumbail control to read

// the pages contained in the pdf control.

thumbCtrl.Initialize( pdfCtrl.GetOcx() );

// Force a refresh on the thumbnail control.

thumbCtrl.RedrawAllThumbs();

}