Document conversion v10.0.0

RTF to PDF Converter for .NET

The RTF to PDF Converter library for .NET can be linked into any .NET application, ASP.NET websites or Windows Forms applications, to add RTF to PDF conversion to your application. Convert RTF strings and RTF files to PDF documents with selectable texts and images, from C# or VB.NET.

Get the PDF document as an array of bytes or as a PDF file. No additional installation is necessary: it is a .NET assembly that you reference in your application, with royalty free development libraries and samples.

NuGet · ExpertPdf.RtfToPdf C# & VB.NET samples included
Input RTF strings or RTF files
Output PDF bytes, file or stream
Targets .NET Framework · ASP.NET 2.0 to 4.5

Everything RTF to PDF does.

The features grouped by how the RTF goes in and how the PDF document comes out: the conversion, the page setup and the output.

Input & conversion

What goes in.

RTF strings and RTF files, converted to PDF documents with selectable texts and images.

RTF strings or files

Convert an RTF string, for example a document built at run time, or an RTF file from the disk.

Selectable texts and images

The PDF documents have selectable texts and images. PNG, JPEG, EMF and WMF pictures in the RTF are rendered.

Fit the page

The RTF content is resized if necessary to fit the available width of the PDF page, and optionally the available height.

Embedded fonts

Embed the true type fonts in the PDF document.

Page setup & output

How the PDF comes out.

Page size, orientation and margins, header and footer. Bytes, file or stream.

Page size and orientation

Choose a standard page size, such as A4, Letter or Legal, in portrait or landscape orientation.

Page margins

Set the left, right, top and bottom margins of the PDF document.

Header and footer

Add a header with a title and a subtitle, and a footer with a text and page numbers.

Append PDF documents

Append existing PDF documents, from files or streams, to the converted document.

Bytes, file or stream

Get the PDF document as an array of bytes, save it to a file, or write it to a stream.

Document information

Set the title, author, subject, keywords and creation date with PdfDocumentInfo.

Passwords and permissions

Protect the PDF with user and owner passwords and set its permissions, with RC4 40 or 128 bit encryption, through PdfSecurityOptions.

PDF/A-1b

Produce PDF/A-1b documents for long-term archiving, with embedded fonts, by setting PdfStandardSubset.

An RTF document, as a PDF.

Create a PdfConverter, set the PDF options, then call one conversion method. The tabs convert a file to a file, a string to bytes with a header and a footer, and a file to the HTTP response of an ASP.NET page.

Program.cs · C#
using ExpertPdf.RtfToPdf;

var pdfConverter = new PdfConverter();
pdfConverter.LicenseKey = "your license key";

// Page size, orientation and margins of the PDF document
pdfConverter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;
pdfConverter.PdfDocumentOptions.PdfPageOrientation =
    PDFPageOrientation.Portrait;
pdfConverter.PdfDocumentOptions.LeftMargin = 36;
pdfConverter.PdfDocumentOptions.RightMargin = 36;
pdfConverter.PdfDocumentOptions.TopMargin = 36;
pdfConverter.PdfDocumentOptions.BottomMargin = 36;

// Convert an RTF file to a PDF file
pdfConverter.SavePdfFromRtfFileToFile("report.rtf",
    "report.pdf");

Install with Install-Package ExpertPdf.RtfToPdf, or reference eprtftopdf.dll from the download. C# and VB.NET samples for ASP.NET and Windows Forms are in the download, and the API reference describes every class and method.

RTF conversion questions, answered.

Common questions about input, output, page setup and requirements.

What does the converter return?
The PDF document as an array of bytes (GetPdfBytesFromRtfFile, GetPdfBytesFromRtfString), as a PDF file (SavePdfFromRtfFileToFile, SavePdfFromRtfStringToFile) or written to a stream (SavePdfFromRtfFileToStream, SavePdfFromRtfStringToStream).
Can I convert both RTF strings and RTF files?
Yes. Every output method has a version for an RTF file, given by its path, and a version for an RTF string, for example a document built by your application.
Is the text in the PDF selectable?
Yes. The PDF documents have selectable texts and images.
Can I set the page size and margins?
Yes. PdfDocumentOptions has the PdfPageSize, PdfPageOrientation, LeftMargin, RightMargin, TopMargin and BottomMargin properties, and the compression level of the PDF document.
Can the PDF have a header and a footer?
Yes. Turn them on with ShowHeader and ShowFooter, then set the header title and subtitle with PdfHeaderOptions, and the footer text and page numbers with PdfFooterOptions.
Can I protect the PDF or make it PDF/A?
Yes. PdfSecurityOptions sets the user and owner passwords and the permissions (RC4, 40 or 128 bit keys), PdfDocumentInfo the title, author, subject and keywords, and PdfStandardSubset produces PDF/A-1b. A PDF/A document cannot be encrypted, so the two cannot be combined.
Does it need an installation?
No. It is a .NET assembly that you reference in your application, or install from NuGet as ExpertPdf.RtfToPdf. Samples and documentation are in the downloaded archive.
Which .NET versions are supported?
The RTF to PDF Converter is a library for .NET Framework applications: ASP.NET 2.0, 3.5, 4.0 and 4.5 websites and Windows Forms applications. The download has the assemblies for .NET 2.0 and .NET 4.0, and the NuGet package also has an x64 optimized variant.
Can I try it before buying?
Yes. The evaluation version is fully functional and can be used for an unlimited time. Download it with the C# and VB.NET samples, and license it on the pricing page when you are ready.

Convert RTF to PDF from .NET.

Download the free trial with C# and VB.NET samples for ASP.NET and Windows Forms. When you are ready, license the RTF to PDF Converter on the pricing page.

Targets.NET Framework · ASP.NET 2.0 to 4.5
Versionv10.0.0