Converter.ConvertAsync
Overloads
ConvertAsync(Byte[], String) | Performs Asynchronous conversion. |
ConvertAsync(Byte[], String, ConversionOptions) | Performs Asynchronous conversion. |
ConvertAsync(Byte[], String, ConversionOptions, Byte[]) | Performs Asynchronous conversion. |
ConvertAsync(Byte[], String, String) | Performs Asynchronous conversion. |
ConvertAsync(Byte[], String, String, ConversionOptions) | Performs Asynchronous conversion. |
ConvertAsync(String) | Performs Asynchronous conversion. |
ConvertAsync(String, ConversionOptions) | Performs Asynchronous conversion. |
ConvertAsync(String, ConversionOptions, Byte[]) | Performs Asynchronous conversion. |
ConvertAsync(String, String) | Performs Asynchronous conversion. |
ConvertAsync(String, String, ConversionOptions) | Performs Asynchronous conversion. |
ConvertAsync(Byte[], String)
Performs Asynchronous conversion.
public static Task<Byte[]> ConvertAsync(Byte[] inputData, string inputFileName)
Parameters
- inputData
- Byte[]
Source byte array to be converted.
- inputFileName
- String
File name or extension of file which is stored as byte array.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
byte[] inputData = File.ReadAllBytes(@"C:\MyDocument.doc");
byte[] result= await Converter.ConvertAsync(inputData, ".doc")
if(result!=null)
{
File.WriteAllBytes("C:/MyOutput.pdf",result);
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(Byte[], String, ConversionOptions)
Performs Asynchronous conversion.
public static Task<Byte[]> ConvertAsync(Byte[] inputData, string inputFileName, ConversionOptions conversionOptions)
Parameters
- inputData
- Byte[]
Source byte array to be converted.
- inputFileName
- String
File name or extension of file which is stored as byte array.
- conversionOptions
- ConversionOptions
Instance of ConversionOptions class that represents the conversion options.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
byte[] inputData = File.ReadAllBytes(@"C:\MyDocument.doc");
// create an instance of ConversionOptions class.
ConversionOptions conversionOptions = new ConversionOptions(PageSize.Letter, PageOrientation.Portrait, 75);
byte[] result=await Converter.ConvertAsync(inputData, "C:\MyDocument.doc",conversionOptions)
if(result!=null)
{
File.WriteAllBytes("C:/MyOutput.pdf",result);
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(Byte[], String, ConversionOptions, Byte[])
Performs Asynchronous conversion.
public static Task<Byte[]> ConvertAsync(Byte[] inputData, string inputFileName, ConversionOptions conversionOptions, Byte[] appendToPdf)
Parameters
- inputData
- Byte[]
Source byte array to be converted.
- inputFileName
- String
File name or extension of file which is stored as byte array.
- conversionOptions
- ConversionOptions
Instance of ConversionOptions class that represents the conversion options.
- appendToPdf
- Byte[]
Byte array for which output to be appended.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
byte[] inputData = File.ReadAllBytes(@"C:\MyDocument.doc");
byte[] appendToPdf = File.ReadAllBytes(@"C:\MyDocument.pdf");
// create an instance of ConversionOptions class.
ConversionOptions conversionOptions = new ConversionOptions(PageSize.Letter, PageOrientation.Portrait, 75);
byte[] result= await Converter.ConvertAsync(inputData, "C:\MyDocument.doc",conversionOptions, appendToPdf);
while(true)
{
if(result!=null)
{
File.WriteAllBytes("C:/MyOutput.pdf",result);
}
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(Byte[], String, String)
Performs Asynchronous conversion.
public static Task<bool> ConvertAsync(Byte[] inputData, string inputFileName, string outputFilePath)
Parameters
- inputData
- Byte[]
Byte array of the source file that need to be converted.
- inputFileName
- String
File name or extension of the source file.
- outputFilePath
- String
File path to store the converted pdf.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
byte[] inputData = File.ReadAllBytes(@"C:\MyDocument.doc");
bool result=await Converter.ConvertAsync(inputData, "C:\MyDocument.doc", "C:\MyOutput.pdf")
if(result)
{
Console.WriteLine("Conversion Completed successfully");
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(Byte[], String, String, ConversionOptions)
Performs Asynchronous conversion.
public static Task<bool> ConvertAsync(Byte[] inputData, string inputFileName, string outputFilePath, ConversionOptions conversionOptions)
Parameters
- inputData
- Byte[]
Byte array of the source file that need to be converted.
- inputFileName
- String
File name or extension of the source file.
- outputFilePath
- String
File path to store the converted pdf.
- conversionOptions
- ConversionOptions
Instance of ConversionOptions class that represents the conversion options.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
// create an instance of ConversionOptions class
ConversionOptions conversionOptions = new ConversionOptions(PageSize.Letter, PageOrientation.Portrait, 75);
byte[] inputData = File.ReadAllBytes(@"C:\MyDocument.doc");
bool result= await Converter.ConvertAsync(inputData, "C:\MyDocument.doc", "C:\MyOutput.pdf", conversionOptions)
if(result)
{
Console.WriteLine("Conversion Completed successfully");
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(String)
Performs Asynchronous conversion.
public static Task<Byte[]> ConvertAsync(string inputFilePath)
Parameters
- inputFilePath
- String
Source file path for conversion.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
byte[] result=await Converter.ConvertAsync( "C:\MyDocument.doc")
if(result!=null)
{
File.WriteAllBytes("C:/MyOutput.pdf",result);
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(String, ConversionOptions)
Performs Asynchronous conversion.
public static Task<Byte[]> ConvertAsync(string inputFilePath, ConversionOptions conversionOptions)
Parameters
- inputFilePath
- String
Source file path for conversion.
- conversionOptions
- ConversionOptions
Instance of ConversionOptions class that represents the conversion options.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
// create an instance of ConversionOptions class.
ConversionOptions conversionOptions = new ConversionOptions(PageSize.Letter, PageOrientation.Portrait, 75);
byte[] result=await Converter.ConvertAsync( "C:\MyDocument.doc",conversionOptions)
if(result!=null)
{
File.WriteAllBytes("C:/MyOutput.pdf",result);
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(String, ConversionOptions, Byte[])
Performs Asynchronous conversion.
public static Task<Byte[]> ConvertAsync(string inputFilePath, ConversionOptions conversionOptions, Byte[] appendToPdf)
Parameters
- inputFilePath
- String
Source file path for conversion.
- conversionOptions
- ConversionOptions
Instance of ConversionOptions class that represents the conversion options.
- appendToPdf
- Byte[]
Byte array of the PDF to precede the converted output.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
byte[] appendToPdf= File.ReadAllBytes("C:\MyDocument.pdf")
// create an instance of ConversionOptions class.
ConversionOptions conversionOptions = new ConversionOptions(PageSize.Letter, PageOrientation.Portrait, 75);
byte[] result=await Converter.ConvertAsync( "C:\MyDocument.doc",conversionOptions,appendToPdf)
if(result!=null)
{
File.WriteAllBytes("C:/MyOutput.pdf",result);
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(String, String)
Performs Asynchronous conversion.
public static Task<bool> ConvertAsync(string sourceFilePath, string outputFilePath)
Parameters
- sourceFilePath
- String
Source file path for conversion.
- outputFilePath
- String
File path to store the converted pdf.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
bool result= await Converter.ConvertAsync("C:\MyDocument.doc", "C:\MyOutput.pdf")
if(result)
{
Console.WriteLine("Conversion Completed successfully");
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(String, String, ConversionOptions)
Performs Asynchronous conversion.
public static Task<bool> ConvertAsync(string sourceFilePath, string outputFilePath, ConversionOptions conversionOptions)
Parameters
- sourceFilePath
- String
Source file path for conversion.
- outputFilePath
- String
File path to store the converted pdf.
- conversionOptions
- ConversionOptions
Instance of ConversionOptions class that represents the conversion options.
Returns
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:
- 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
This example shows how to convert source file to PDF file using ConvertAsync.using System;
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static async Task run()
{
// create an instance of ConversionOptions class
ConversionOptions conversionOptions = new ConversionOptions(PageSize.Letter, PageOrientation.Portrait, 75);
bool result= await Converter.ConvertAsync("C:\MyDocument.doc", "C:\MyOutput.pdf", conversionOptions)
if(result)
{
Console.WriteLine("Conversion Completed successfully");
}
}
static void Main()
{
run().Wait();
}
}
See Also
ConverterceTe.DynamicPDF.Conversion