Category / Section
How to convert RTF file to PDF using Essential DocIO?
1 min read
The native RTF to PDF conversion present in Pdf.Base library has few limitations such as inability to render watermarks, header footer, page break etc. To overcome these limitations, the user can make user of the DocIO.base library to convert the RTF to PDF
The below code snippets and working sample explains how to convert a RTF to PDF using the DocIO.Base library.
Syncfusion.DocIO.DLS.WordDocument wordDoc = new Syncfusion.DocIO.DLS.WordDocument(@"../../RTFtoDoc.rtf"); Syncfusion.DocToPDFConverter.DocToPDFConverter converter = new Syncfusion.DocToPDFConverter.DocToPDFConverter(); PdfDocument pdfDoc = converter.ConvertToPDF(wordDoc); pdfDoc.Save("DoctoPDF.pdf"); System.Diagnostics.Process.Start("DoctoPDF.pdf");
Sample:
http://www.syncfusion.com/downloads/support/directtrac/general/RTF_to_PDF-774120728.zip