cete.dynamicpdf.conversion.conversionerroreventargs
ConversionErrorEventArgs
- Namespace: ceTe.DynamicPDF.Conversion
- Assemblies: DynamicPDF.Converter.dll
Provides data for the ConversionError event.
public class ConversionErrorEventArgs : ConvertedEventArgs
Public Class ConversionErrorEventArgs
Inherits ConvertedEventArgs
Inheritance: Object → ConvertedEventArgs → ConversionErrorEventArgs
Licensing Info
This class is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
This example shows how to make use of ConversionError event.
Imports System.IO
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' create an instance of AsyncConverter
Dim converter As AsyncConverter = New AsyncConverter
' Events to know if conversion completed successfully or not
AddHandler converter.Converted, AddressOf converter_Converted
AddHandler converter.ConversionError, AddressOf converter_ConversionError
' Call Convert method to start conversion asynchronously and Get the status of conversion
Dim asyncConversion As AsyncConversion = converter.Convert("C:\MyDocument.doc", "C:\MyOutput.pdf")
While (True)
If (asyncConversion.Completed) Then
Dim MyData() As Byte = asyncConversion.GetOutputData()
Exit While
End If
End While
End Sub
Sub converter_Converted(ByVal sender As Object, ByVal e As ConvertedEventArgs)
Console.WriteLine(e.SourceFilePath + " was converted successfully.")
End Sub
Sub converter_ConversionError(ByVal sender As Object, ByVal e As ConversionErrorEventArgs)
Console.WriteLine(e.SourceFilePath + " conversion failed for the following reason:")
Console.WriteLine("\"" + e.Exception.Message + " \ "")
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// create an instance of AsyncConverter
AsyncConverter converter = new AsyncConverter();
// Events to know if conversion completed successfully or not
converter.Converted += new ConvertedEventHandler(converter_Converted);
converter.ConversionError += new ConversionErrorEventHandler(converter_ConversionError);
// Call Convert method to start conversion asynchronously and Get the status of conversion
AsyncConversion asyncConversion = converter.Convert(@"C:\MyDocument.doc", @"C:\MyOutput.pdf");
while(true)
{
if (asyncConversion.Completed)
{
byte[] MyData = asyncConversion.GetOutputData();
break;
}
}
}
private static void converter_Converted(object sender, ConvertedEventArgs e)
{
Console.WriteLine(e.SourceFilePath + " was converted successfully.");
}
private static void converter_ConversionError(object sender, ConversionErrorEventArgs e)
{
Console.WriteLine(e.SourceFilePath + " conversion failed for the following reason:");
Console.WriteLine("\"" + e.Exception.Message + "\"");
}
}
Properties
Exception
Gets the exception that occurred during the conversion operation.
public Exception Exception { get; set; }
Public Property Exception As Exception
Property Value
Licensing Info
This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
OutputFilePath
The path where the converted output file will be stored. (Inherited from ConvertedEventArgs)
public string OutputFilePath { get; set; }
Public Property OutputFilePath As String
Property Value
Licensing Info
This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
This example shows how to make use of OutPutFilePath property of converted event argument.
Imports System.IO
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' create an instance of AsyncConverter
Dim converter As AsyncConverter = New AsyncConverter
' Events to know if conversion completed successfully or not
AddHandler converter.Converted, AddressOf converter_Converted
' Call Convert method to start conversion asynchronously and Get the status of conversion
Dim asyncConversion As AsyncConversion = converter.Convert("C:\MyDocument.doc", "C:\MyOutput.pdf")
End Sub
Sub converter_Converted(ByVal sender As Object, ByVal e As ConvertedEventArgs)
Console.WriteLine(e.OutputFilePath + " is the output file path.")
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// create an instance of AsyncConverter
AsyncConverter converter = new AsyncConverter();
// Events to know if conversion completed successfully or not
converter.Converted += new ConvertedEventHandler(converter_Converted);
// Call Convert method to start conversion asynchronously and Get the status of conversion
AsyncConversion asyncConversion = converter.Convert(@"C:\MyDocument.doc", @"C:\MyOutput.pdf");
}
private static void converter_Converted(object sender, ConvertedEventArgs e)
{
Console.WriteLine(e.OutputFilePath + " is the output file path.")
}
}
SourceFilePath
The path of the input file to be converted. (Inherited from ConvertedEventArgs)
public string SourceFilePath { get; set; }
Public Property SourceFilePath As String
Property Value
Licensing Info
This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
Examples
This example shows how to make use of SourceFilePath property of converted event argument.
Imports System.IO
Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' create an instance of AsyncConverter
Dim converter As AsyncConverter = New AsyncConverter
' Events to know if conversion completed successfully or not
AddHandler converter.Converted, AddressOf converter_Converted
' Call Convert method to start conversion asynchronously and Get the status of conversion
Dim asyncConversion As AsyncConversion = converter.Convert("C:\MyDocument.doc", "C:\MyOutput.pdf")
End Sub
Sub converter_Converted(ByVal sender As Object, ByVal e As ConvertedEventArgs)
Console.WriteLine(e.SourceFilePath + " was converted successfully.")
End Sub
End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// create an instance of AsyncConverter
AsyncConverter converter = new AsyncConverter();
// Events to know if conversion completed successfully or not
converter.Converted += new ConvertedEventHandler(converter_Converted);
// Call Convert method to start conversion asynchronously and Get the status of conversion
AsyncConversion asyncConversion = converter.Convert(@"C:\MyDocument.doc", @"C:\MyOutput.pdf");
}
private static void converter_Converted(object sender, ConvertedEventArgs e)
{
Console.WriteLine(e.SourceFilePath + " was converted successfully.");
}
}
Methods
Equals(Object)
Determines whether the specified Object is equal to the current Object . (Inherited from Object)
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
Licensing Info
This method is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
GetHashCode()
Serves as a hash function for a particular type. (Inherited from Object)
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for the current Object .
Licensing Info
This method is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
Licensing Info
This method is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .
Licensing Info
This method is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Converter selected.
- A DynamicPDF Converter for .NET v3.X Developer license.