PowerPointConverter.ConvertAsync

Overloads

ConvertAsync()Does the Asynchronous conversion
ConvertAsync(Byte[])Does the Asynchronous conversion
ConvertAsync(String)Does the Asynchronous conversion

ConvertAsync()

Does the Asynchronous conversion

public Task<Byte[]> ConvertAsync()

Returns

Task<Byte[]>

returns a Task where the result type is byte array

Licensing Info

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

Examples

This example shows how to use convert method with byte array as return type.
using ceTe.DynamicPDF.Conversion;
using System.IO;

class MyClass
{
    static async Task run()
    {
              
        // Create new instance of Converter.
        PowerPointConverter powerPoint = new PowerPointConverter(@"C:\MyDocument.ppt");
        
        //Call Convert method to start conversion
        byte[] result= powerPoint.ConvertAsync();
        if(result!=null)
        {
                 File.WriteAllBytes("C:\MyDocument.pdf", result);
               
        }
    }
    static void Main()
    {  
        run().Wait();
    }
}

ConvertAsync(Byte[])

Does the Asynchronous conversion

public Task<Byte[]> ConvertAsync(Byte[] pdfToAppendTo)

Parameters

pdfToAppendTo
Byte[]

Contents of Pdf in byte array format, to which the current conversion needs to be appended to

Returns

Task<Byte[]>

returns a Task where the result type is byte array

Licensing Info

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

Examples

This example shows how to use convert method with pdf byte array as parameter and byte array as return type.
using ceTe.DynamicPDF.Conversion;

class MyClass
{
    static async Task run()
    {
              
        // Create new instance of Converter.
        PowerPointConverter powerPoint = new PowerPointConverter(@"C:\MyDocument.ppt");
        
        //Call Convert method to start conversion
        byte[] result= await powerPoint.ConvertAsync();
        if(result!=null)
        {
             byte[] finalResult=await powerPoint.ConvertAsync(result)
             File.WriteAllBytes("C:\MyDocument.pdf", finalResult);
        }
    }
    static void Main()
    {  
        run().Wait();
    }
}

ConvertAsync(String)

Does the Asynchronous conversion

public Task<bool> ConvertAsync(string outputFilePath)

Parameters

outputFilePath
String

Returns

Task<bool>

Licensing Info

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

Examples

This example shows how to use convert method with outputFilePath as parameter.
using ceTe.DynamicPDF.Conversion;
using Syste.IO;

class MyClass
{
    static async Task run()
    {
              
        // Create new instance of Converter.
        PowerPointConverter powerPoint = new PowerPointConverter(@"C:\MyDocument.ppt");
        
        //Call Convert method to start conversion
        bool result=await powerPoint.ConvertAsync(@"C:\MyOutput.pdf");
        if(result)
        {
            Console.WriteLine("Completed successfully);
             
        }
    }
    static void Main()
    {  
        run().Wait();
    }
}

See Also

PowerPointConverter
ceTe.DynamicPDF.Conversion