Available for: UI for ASP.NET AJAX | UI for ASP.NET MVC | UI for WPF | UI for WinForms | UI for Silverlight | UI for Xamarin | UI for ASP.NET Core

Getting Started

This article will get you started in using the RadPdfProcessing library. It contains the following sections:

Assembly References

In order to use the RadPdfProcessing library in your project, you need to add references to the following assemblies:

  • Telerik.Windows.Documents.Core.dll
  • Telerik.Windows.Documents.Fixed.dll
  • Telerik.Windows.Zip.dll

To describe different colors, shapes and other properties, RadPdfProcessing depends on the listed below .NET assemblies, which you should also refer in your project:

  • WindowsBase.dll
  • PresentationCore.dll
  • PresentationFramework.dll

Creating a Document

RadFixedDocument is the root element in the library. It consists of RadFixedPage objects and instructions for annotations and destinations in the document. Example 1 shows how to create a document and add a page to it.

Example 1: Create RadFixedDocument

RadFixedDocument document = new RadFixedDocument(); 
RadFixedPage page = document.Pages.AddPage(); 

The page can then be edited through a FixedContentEditor instance. Example 2 creates an editor and adds a TextFragment to the page object created in Example 1.

Example 2: Add text

FixedContentEditor editor = new FixedContentEditor(page); 
editor.DrawText("Hello RadPdfProcessing!"); 

Exporting to PDF

Exporting to PDF format can be achieved with the PdfFormatProvider class. Example 3 shows how to export the RadFixedDocument created in Examples 1 and 2 to a file.

Example 3: Export to PDF

PdfFormatProvider provider = new PdfFormatProvider(); 
using (Stream output = File.OpenWrite("Hello.pdf")) 
    provider.Export(document, output); 

See Also

In this article
Not finding the help you need? Improve this article