BCL easyPDF SDK
easyPDF SDK Usermanual
PDF Creator Programming API  |  Download Free Trial  |  Contact Us to Purchase

OnInit Method

Called when converter is initialized. Use cnvMonitorResponse as a return value.

Function OnInit() As Long

public class PDFConverterMonitor {
   public delegate cnvMonitorResponse OnInitEventHandler();
   public event OnInitEventHandler OnInit;
}

public interface IPDFConverterMonitorEvents {
   cnvMonitorResponse OnInitEventHandler();
}

public class PDFConverterMonitor {
   public IPDFConverterMonitorEvents events;
}

Parameters

N/A.

Return Values

A value defined in the cnvMonitorResponse enumeration.

Remarks

N/A.

Example Usage

' Declare variable with "WithEvents" keyword
Private WithEvents oPDFConverterMonitor As easyPDFConverter.PDFConverterMonitor
 
Private Function oPDFConverterMonitor_OnInit() As Long
    '...
    oPDFConverterMonitor_OnInit = CNV_MON_CONTINUE_CONVERSION
End Function
 
Private Function oPDFConverterMonitor_OnPageStart(ByVal PageNumber As Long, ByVal PageCount As Long, ByVal FileName As String) As Long
    '...
    oPDFConverterMonitor_OnPageStart = CNV_MON_CONTINUE_CONVERSION
End Function
 
Private Function oPDFConverterMonitor_OnEnd(ByVal Result As easyPDFConverter.cnvResult) As Long
    '...
    oPDFConverterMonitor_OnEnd = CNV_MON_CONTINUE_CONVERSION
End Function
 
' ...
Private Sub Init()
    Set oConverter = CreateObject("easyPDF.PDFConverter.8")
    Set oPDF2Image = oConverter.PDF2Image
    Set oPDFConverterMonitor = oConverter.PDFConverterMonitor
    oPDF2Image.ImageFormat = CNV_IMAGE_FMT_JPEG
    oPDF2Image.Convert "C:\test\input.pdf", "C:\test\output.jpg"
End Sub