AsyncConversion.Aborted Property

Gets an indication whether the asynchronous operation has aborted.

public bool Aborted { get; }
Public Property Aborted As Boolean

Property Value

Boolean

Licensing Info

This property is a DynamicPDF Converter feature. One of the following is required for non-evaluation usage:

Examples

This example shows how to make use of aborted property of AsyncConversion.
Imports ceTe.DynamicPDF.Conversion
Module Module1

    Sub Main()

        ' create an instance of AsyncConverter
        Dim converter As AsyncConverter = New AsyncConverter

        ' 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")

        asyncConversion.Abort()

        While(True)
            If(asyncConversion.Aborted) Then
                Console.WriteLine("File is aborted")
                Exit While
            Else If(asyncConverion.Completed) Then
                Console.WriteLine("Conversion Completed")
                Exit While
            End IF
        End While
    End Sub

End Module
using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
    static void Main()
    {
        // create an instance of AsyncConverter
        AsyncConverter converter = new AsyncConverter();

        // Call Convert method to start conversion asynchronously and  Get the status of conversion
        AsyncConversion asyncConversion = converter.Convert(@"C:\MyDocument.doc", @"C:\MyOutput.pdf");
        asyncConversion.Abort();
        while (true)
        {
            if (asyncConversion.Aborted)
             {
                Console.WriteLine("File is aborted");
                break;
             }
             else if(asyncConverion.Completed)
             {
                Console.WriteLine("Conversion Completed");
                break;
             }   
        }
    }
}

See Also

AsyncConversion
ceTe.DynamicPDF.Conversion

In this topic