|
|
|
|
|
| EvoPdf Next RTF to PDF Converter
|
| for .NET |
|
|
|
|
The RTF to PDF Converter is a component of the EvoPdf Next Library for .NET that enables accurate conversion
of complex RTF documents to PDF.
You can enhance the generated PDF with a table of contents, headers, footers and stamps or apply security features.
The RTF to PDF Converter is implemented as an AddOn for the EvoPdf Next HTML to PDF Converter for .NET component and they must be
referenced together in the same project.
The library targets .NET Standard 2.0 and can be used in .NET Core and .NET Framework applications that you
can deploy on Windows and Linux platforms, including Azure App Service and Functions or Docker.
|
|
|
|
|
|
|
 |
|
Main Features
|
|
|
Convert RTF documents from memory or from a file to PDF
Convert RTF content from .NET strings to PDF
Use custom PDF page settings to automatically reflow the content
Automatically create a table of contents based on headings in RTF
Add HTML headers, footers or stamps to the generated PDF
|
|
Control the PDF document display with PDF viewer preferences
Encrypt, set permissions and set passwords for the generated PDF documents
Add digital signatures to the generated PDF document
Asynchronous RTF to PDF methods that can be used with async and await
|
|
|
 |
|
Compatibility
|
|
|
Windows 10, 11 and Windows Server 2016 to 2025
Linux 64-bit distributions
.NET 10.0, 9.0, 8.0, 7.0, 6.0, .NET Standard 2.0
.NET Framework 4.6.2 to 4.8.1
|
|
Azure App Service and Azure Functions
Azure Cloud Services and Virtual Machines
Web, console and desktop applications
Docker containers for Windows and Linux
|
|
|
 |
|
Getting Started
|
|
|
|
You can quickly get started with the ASP.NET demo application available for download, or you can integrate the library into your own project.
The online documentation,
contains detailed instructions on how to run an application using EvoPdf Next Library for .NET on Windows and Linux machines, Azure App Service
and Azure Functions for Windows and Linux.
You can view the current capabilities of the library by checking the
online demo
application and the API reference in the online documentation.
|
|
|
|
Download Demo Application
|
|
|
|
The ZIP package available for download from the link below includes an ASP.NET demo application project with complete C# source code covering all major library features.
|
|
|
|
|
|
Running the samples in the demo application that involve HTML to PDF conversion features on Linux platforms might require installing some dependency packages. The documentation includes an entire section dedicated to building, publishing and running the demo application on multiple platforms.
|
|
 |
|
NuGet Packages
|
|
|
|
The RTF to PDF Converter is distributed as part of the
EvoPdf.Next.RtfToPdf.AddOn
NuGet package and must be installed together with
EvoPdf.Next.HtmlToPdf.Windows
or
EvoPdf.Next.HtmlToPdf.Linux
to enable RTF to PDF conversion in your application, depending on the deployment target.
As an alternative, you can reference the
EvoPdf.Next.Windows
or
EvoPdf.Next.Linux
metapackages for all components which is a more convenient option if you are also
using other components of the library.
There is also a multiplatform metapackage
EvoPdf.Next
that references all the EvoPdf Next Library components for both Windows and Linux platforms.
|
|
 |
|
Installation
|
|
|
|
The RTF to PDF Converter is implemented as an AddOn for the EvoPdf Next HTML to PDF Converter for .NET
component and they must be referenced together in the same project, generally through a NuGet metapackage which installs both the HTML to PDF Converter NuGet
package and the RTF to PDF Converter AddOn.
The HTML to PDF Converter component uses a platform specific runtime.
On Windows platforms, the runtime generally does not require the installation of additional dependencies.
On Linux platforms installing some dependency packages might be necessary, depending on the exact version of Linux you are using.
In online documentation in
the Getting Started and Publish guides you can find instructions about Linux dependencies installation on a variety of Linux platforms.
|
|
 |
|
EvoPdf.Next Namespace
|
|
|
|
All components of the EvoPdf Next for .NET library share the same
EvoPdf.Next
namespace and can be used together in the same application.
To use the library in your own code, add the using directive at the top of your C# source file, as shown below.
|
|
// add this using statement at the top of your C# file
using EvoPdf.Next;
|
|
 |
|
C# Code Sample |
|
|
You can use the sample code below to convert an RTF document to a PDF document that you can either save to a file
or send to the browser for download.
|
|
// Create an RTF to PDF converter object with default settings
RtfToPdfConverter rtfToPdfConverter = new RtfToPdfConverter();
// Convert RTF file to a PDF in a memory buffer
byte[] outPdfBuffer = rtfToPdfConverter.ConvertFileToPdf(rtfFilePath);
|
|