ConversionCompleted Delegate
Represents the method that will handle the ConversionCompleted event.
public delegate void ConversionCompleted(Object sender, ConversionCompletedEventArgs e)
Public Delegate Sub ConversionCompleted(sender As Object, e As ConversionCompletedEventArgs)
Parameters
- sender
- Object
The source of the event
Reference of ConversionCompletedEventArgs .
Inheritance: ObjectDelegateMulticastDelegateConversionCompleted
Licensing Info
This delegate is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
Example shows how to use conversionCompleted event.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim rtfConverter As RtfConverter = New RtfConverter("C:\MyDocument.rtf")
' Events to know if conversion completed successfully or not
AddHandler rtfConverter.Completed, AddressOf completed
' Call Convert method to start conversion
rtfConverter.Convert("C:\MyOutput.pdf")
End Sub
Sub completed(ByVal sender As Object, ByVal e As ConversionCompletedEventArgs)
If (e.FailException IsNot Nothing) Then
Console.WriteLine("Conversion failed with:" + e.FailException.Message)
End If
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter by providing suitable parameters.
RtfConverter rtfConverter = new RtfConverter(@"C:\MyDocument.rtf");
//Events to know if conversion completed successfully or not
rtfConverter.Completed += new ConversionCompleted(completed);
//Call Convert method to start conversion
rtfConverter.Convert(@"C:\MyOutput.pdf");
}
public static void completed(object sender, ConversionCompletedEventArgs e)
{
if(e.FailException!=null)
Console.WriteLine("Conversion failed with:" + e.FailException.Message);
}
}