Edit this page

Using PdfFormatProvider

PdfFormatProvider makes it easy to export RadDocument to PDF format, preserving the entire document structure and formatting.

All you have to do in order to use PdfFormatProvider is reference the Telerik.WinControls.RichTextEditor.dll assembly and add the following namespace:

  • Telerik.WinForms.Documents.FormatProviders.Pdf

Export

In order to export a document to PDF you need to use the Export() method of PdfFormatProvider.

The code snippet in Example 1 shows how to create a PdfFormatProvider instance and use it to export the document to PDF.

Export to Pdf File

PdfExportSettings pdfExportSettings = new PdfExportSettings();
pdfExportSettings.ContentsDeflaterCompressionLevel = 9;
pdfExportSettings.DrawPageBodyBackground = false;
PdfFormatProvider pdfFormatProvider = new PdfFormatProvider();
pdfFormatProvider.ExportSettings = pdfExportSettings;

Dim pdfExportSettings As PdfExportSettings = New PdfExportSettings()
pdfExportSettings.ContentsDeflaterCompressionLevel = 9
pdfExportSettings.DrawPageBodyBackground = False
Dim pdfFormatProvider As PdfFormatProvider = New PdfFormatProvider()
pdfFormatProvider.ExportSettings = pdfExportSettings

The result from the method is a document that can be opened in any application that supports PDF documents.

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy