The RadFixedDocument class name is used in both RadPdfViewer
. However, the document models of these controls are still not completely unified and the instances cannot replace each other.
RadPdfViewer is intended only to visualize PDF documents and the corresponding instance of RadFixedDocument could be created only through PdfFormatProvider as demonstrated in the corresponding help article
. When using the constructor of RadFixedDocument, an instance for RadPdfProcessing is created.
If you would like to create/modify a PDF document and then show it in the viewer, you could first use RadPdfProcessing to apply the desired actions, export the final document and then import it in RadPdfViewer. Here is a modified version of the snippet from your post, which demonstrates how this could be achieved:
RadFixedDocument document =
RadFixedPage page = document.Pages.AddPage();
FixedContentEditor editor =
PdfFormatProvider processingProvider =
 content = processingProvider.Export(document);
PdfFormatProvider viewerProvider =
RadFixedDocument viewerDocument = viewerProvider.Import();
pdfViewer.Document = viewerDocument;
Hope this is helpful.
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.