TextConverter Constructors
Overloads
TextConverter(String) | Creates an instance of the TextConverter class. |
TextConverter(String, TextConversionOptions) | Creates an instance of the TextConverter class. |
TextConverter(String)
Creates an instance of the TextConverter class.
public TextConverter(string inputText)
Public Sub New (inputText As String)
Parameters
- inputText
- String
input text that needs to be converted
Licensing Info
This constructor 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 TextConverter constructor.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
Dim txt="This is the text!;
' Create new instance of Converter by providing suitable parameters.
Dim txtConversion As TextConverter = New TextConverter(txt)
' Call Convert method to start conversion
txtConversion.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
String txt="This is the text!;
// Create new instance of Converter by providing suitable parameters.
TextConverter txt = new TextConverter(txt);
//Call Convert method to start conversion
txt.Convert(@"C:\MyOutput.pdf");
}
}
TextConverter(String, TextConversionOptions)
Creates an instance of the TextConverter class.
public TextConverter(string inputText, TextConversionOptions conversionOptions)
Public Sub New (inputText As String, conversionOptions As TextConversionOptions)
Parameters
- inputText
- String
input text that needs to be converted
- conversionOptions
- TextConversionOptions
Initializes the ConversionOptions property of the class.
Licensing Info
This constructor 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 TextConverter class with text and conversionOptions as parameter.Imports ceTe.DynamicPDF.Conversion
Module Module1
Sub Main()
' create new instance of TextConversionOptions.
Dim conversionOptions As TextConversionOptions = New TextConversionOptions(True)
'Reading from a txt file.
Dim txt=File.ReadAllText(@"C:/MyDocument.txt");
' Create new instance of Converter by providing suitable parameters.
Dim txtConversion As TextConverter = New TextConverter(txt,conversionOptions)
' Call Convert method to start conversion
txtConversion.Convert("C:\MyOutput.pdf")
End Sub
End Module
using ceTe.DynamicPDF.Conversion;
class MyClass
{
static void Main()
{
// create new instance of TextConversionOptions.
TextConversionOptions conversionOptions=new TextConversionOptions(true);
//Reading from a txt file.
String txt=File.ReadAllText(@"C:/MyDocument.txt");
// Create new instance of Converter by providing suitable parameters.
TextConverter txt = new TextConverter(txt,conversionOptions);
//Call Convert method to start conversion
txt.Convert(@"C:\MyOutput.pdf");
}
}