ExcelConverter.Convert
Overloads
Convert() | Converts Excel file to PDF. |
Convert(Byte[]) | Converts Excel to PDF. |
Convert(String) | Converts Excel file to PDF. |
Convert()
Converts Excel file to PDF.
public Byte[] Convert()
Function Convert() As Byte()
Returns
Outputs converted PDF in a byte array format
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 output byte array as return type.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx")
' Call Convert method to start conversion
Dim output As Byte() = excelConversion.Convert()
If (output IsNot Nothing) Then
'save byte array output to a file.
File.WriteAllBytes("C:\MyOutputFile.pdf", output)
End If
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter.
ExcelConverter excel = new ExcelConverter(@"C:\MyDocument.xlsx");
//Call Convert method to start conversion
byte []output=excel.Convert();
if(output!=null)
{
//save byte array output to a file.
File.WriteAllBytes("C:\MyOutputFile.pdf",output);
}
}
}
Convert(Byte[])
Converts Excel to PDF.
public Byte[] Convert(Byte[] pdfToAppendTo)
Function Convert(pdfToAppendTo As Byte()) As Byte()
Parameters
- pdfToAppendTo
- Byte[]
Contents of PDF in byte array format, to which the current conversion needs to be appended to.
Returns
Outputs converted PDF in a byte array format
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
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx")
' Call Convert method to start conversion
Dim output As Byte() = excelConversion.Convert()
If (output IsNot Nothing) Then
Dim finalOutput As Byte() = excelConversion.Convert(output)
'save byte array output to a file.
File.WriteAllBytes("C:\MyOutputFile.pdf", finalOutput)
End If
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter.
ExcelConverter excel = new ExcelConverter(@"C:\MyDocument.xlsx");
//Call Convert method to start conversion
byte []output=excel.Convert();
if(output!=null)
{
byte []finalOutputByte=excel.Convert(output);
//save byte array output to a file.
File.WriteAllBytes("C:\MyOutputFile.pdf",finalOutputByte);
}
}
}
Convert(String)
Converts Excel file to PDF.
public void Convert(string outputFilePath)
Sub Convert(outputFilePath As String)
Parameters
- outputFilePath
- String
File path for output PDF file where it needs to be saved
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 outputFilePath as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' Create new instance of Converter by providing suitable parameters.
Dim excelConversion As ExcelConverter = New ExcelConverter("C:\MyDocument.xlsx")
' Call Convert method to start conversion
excelConversion.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// Create new instance of Converter.
ExcelConverter excel = new ExcelConverter(@"C:\MyDocument.xlsx");
//Call Convert method to start conversion
excel.Convert(@"C:\MyOutput.pdf");
}
}