VisioConverter.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()
Function ConvertAsync() As Task(Of Byte())
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 use convert method with byte array as return type.Imports ceTe.DynamicPDF.Conversion
Module Module1
Async Function run() As Task
' Create new instance of Converter by providing suitable parameters.
Dim visioConversion As VisioConverter = New VisioConverter("C:\MyDocument.vsd")
' Call Convert method to start conversion
Dim result= Await visioConversion.ConvertAsync()
If (result IsNot Nothing) Then
File.WriteAllBytes("C:\MyDocument.pdf",result)
End If
End Function
Sub Main()
run().Wait()
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
using System.IO;
class MyClass
{
static async Task run()
{
// Create new instance of Converter.
VisioConverter visio = new VisioConverter(@"C:\MyDocument.vsd");
//Call Convert method to start conversion
byte[] result=await visio.ConvertAsync();
if(result!=null)
{
File.WriteAllBytes("C:\MyDocument.pdf", result);
break;
}
}
static void Main()
{
run().Wait();
}
}
ConvertAsync(Byte[])
Does the Asynchronous conversion
public Task<Byte[]> ConvertAsync(Byte[] pdfToAppendTo)
Function ConvertAsync(pdfToAppendTo As Byte()) As Task(Of Byte())
Parameters
- pdfToAppendTo
- Byte[]
Contents of Pdf in byte array format, to which the current conversion needs to be appended to
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 use convert method with pdf byte array as parameter and byte array as return type.Imports ceTe.DynamicPDF.Conversion
Module Module1
Async Function run() As Task
' Create new instance of Converter by providing suitable parameters.
Dim visioConversion As VisioConverter = New VisioConverter("C:\MyDocument.vsd")
' Call Convert method to start conversion
Dim result= Await visioConversion.ConvertAsync()
If (result IsNot Nothing) Then
Dim finalResult= Await visioConversion.ConvertAsync(result)
File.WriteAllBytes("C:\MyDocument.pdf",finalResult)
End If
End Function
Sub Main()
run().Wait()
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
using System.IO;
class MyClass
{
static async Task run()
{
// Create new instance of Converter.
VisioConverter visio = new VisioConverter(@"C:\MyDocument.vsd");
//Call Convert method to start conversion
byte[] result=await visio.ConvertAsync();
if(result!=null)
{
byte[] finalResult=await visio.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)
Function ConvertAsync(outputFilePath As String) As Task(Of Boolean)
Parameters
- outputFilePath
- String
Returns
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 use convert method with byte array as return type.Imports ceTe.DynamicPDF.Conversion
Module Module1
Async Function run() As Task
' Create new instance of Converter by providing suitable parameters.
Dim visioConversion As VisioConverter = New VisioConverter("C:\MyDocument.vsd")
' Call Convert method to start conversion
Dim result= Await visioConversion.ConvertAsync("C:\MyOutput.pdf")
If (result) Then
Console.WriteLine("Completed successfully);
End If
End Function
Sub Main()
run().Wait()
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
using Syste.IO;
class MyClass
{
static async Task run()
{
// Create new instance of Converter.
VisioConverter visio = new VisioConverter(@"C:\MyDocument.vsd");
//Call Convert method to start conversion
bool result=await visio.ConvertAsync(@"C:\MyOutput.pdf");
if(result)
{
Console.WriteLine("Completed successfully);
}
}
static void Main()
{
run().Wait();
}
}