Edit this page
Available for: UI for ASP.NET AJAX | UI for ASP.NET MVC | UI for WPF | UI for WinForms | UI for Silverlight

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

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.

[C#] 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.

[C#] 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.

[C#] Example 3: Export to PDF

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

See Also