9 Answers, 1 is accepted
RadPdfProcessing is independent of UI library and has no notion of the way the document should be visualized. This is why is not possible to export a PDF document to image using this library.
In order to achieve your goal, you could use the PdfViewer control to import the document and create images from its pages using the ThumbnailFactory class. The following snippet demonstrates how to achieve this for the first page of the RadFixedDocument:
The ThumbnailFactory returns a picture of the content of the document and it may not have background set. The additional steps in the snippet above are used to set a background for the image.
Hope this helps.
You should be aware that the example from my previous post will work only for the RadPdfViewer from the Telerik UI for WPF suite. You could refer the corresponding -s in your project and convert the document.
If this doesn't fit your needs, you could check this article, which explains how to create a printable panel.
Thank you Tanya for your answer, although I couldn't test it, because the code provided uses the ThumbnailFactory WPF class and my project is Winform.
Is it possible to implement this funcionality in Winform?
I didn't see your last response... In any case, I included in my project some WPF dlls but I'm having some problems.
In the last line, I get an VS error saying "page: a value of the type Telerik.Windows.Pdf.Documents.Fixed.Model.RadFixedPage cannot be converted to the type Telerik.Windows.Documents.Fixed.Model.RadFixedPage.
I've opened a support ticket.
Where can I get (download) library Telerik.Windows.Documents.UI to use ThumbnailFactory?
The ThumbnailFactory class is part of the API of RadPdfViewer for WPF. You can download the suite through your telerik.com account and more information on how to use the PdfViewer control you can find in the related documentation topics: Getting Started, Exporting Fixed Page to Image.
Hope this is helpful.
Thank you Tanya,
From what version of Telerik I can get all dll libraries? I can't find Telerik.Windows.Controls.FixedDocumentViewers.dll .
The Telerik.Windows.Controls.FixedDocumentViewers.dll file is available since the Q1 2012 release of UI for WPF and should be present in the Binaries folder if you have a newer version. In case you are facing any issues using the PdfViewer control, I would like to ask you to submit your questions in the forum section dedicated to the specific component: https://www.telerik.com/forums/wpf/pdfviewer. Thank you in advance.