RtfConverter.Convert

Overloads

Convert()Converts Rtf to Pdf
Convert(Byte[])Converts Rtf to Pdf
Convert(String)Converts Rtf to Pdf

Convert()

Converts Rtf to Pdf

public Byte[] Convert()

Returns

Byte[]

returns a output pdf 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 output byte array as return type.
using ceTe.DynamicPDF.Conversion;

class MyClass
{
    static void Main()
    {        
        // Create new instance of Converter.
        RtfConverter rtf = new RtfConverter(@"C:\MyDocument.rtf");
        
        //Call Convert method to start conversion
        byte []output=rtf.Convert();
        
        if(output!=null)
        {
            //save byte array output to a file.
            File.WriteAllBytes("C:\MyOutputFile.pdf",output);
        }
    }
}

Convert(Byte[])

Converts Rtf to Pdf

public Byte[] Convert(Byte[] pdfToAppendTo)

Parameters

pdfToAppendTo
Byte[]

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

Returns

Byte[]

returns a output pdf 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 void Main()
    {        
        // Create new instance of Converter.
        RtfConverter rtf = new RtfConverter(@"C:\MyDocument.rtf");
        
        //Call Convert method to start conversion
        byte []output=rtf.Convert();
        
        if(output!=null)
        {
             byte []finalOutputByte=rtf.Convert(output);
             //save byte array output to a file.
             File.WriteAllBytes("C:\MyOutputFile.pdf",finalOutputByte);
        }
    }
}

Convert(String)

Converts Rtf to Pdf

public void Convert(string outputFilePath)

Parameters

outputFilePath
String

Path where the output file needs to be saved

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;

class MyClass
{
    static void Main()
    {        
        // Create new instance of Converter.
        RtfConverter rtf = new RtfConverter(@"C:\MyDocument.rtf");
        
        //Call Convert method to start conversion
        rtf.Convert(@"C:\MyOutput.pdf");
    }
}

See Also

RtfConverter
ceTe.DynamicPDF.Conversion