This is a migrated thread and some comments may be shown as answers.

Conversion to Image from PDF, WORD OR EXCEL

1 Answer 642 Views
Panel
This is a migrated thread and some comments may be shown as answers.
Shanti 😎
Top achievements
Rank 2
Veteran
Shanti 😎 asked on 06 May 2020, 05:25 AM

H

The PDF, WORD OR EXCEL documents in my file should be converted to image and then shown in the Rad panel.

Which control should I choose?

Can you give me a sample code.

Waiting for your favorable response,

Thank you.

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 May 2020, 12:04 PM

Hello, Tovino, 

Telerik UI for WinForms suite offers the following controls to load the content and display pdf, Word or Excel files:

- RadPdfViewer: a control that can natively visualize PDF documents straight in your application. It comes with a predefined UI that is intuitive and provides the means for utilizing the features of the control. You can find more information here: https://docs.telerik.com/devtools/winforms/controls/pdfviewer/overview

- RadRichTextEditor: a control that is able to display and edit rich-text content including formatted text arranged in pages, paragraphs, spans (runs), tables, etc. It supports different providers for importing/exporting different document types. DocxFormatProvider makes it easy to import and export RadRichTextEditor to/from DOCX format, preserving the entire document structure and formatting: https://docs.telerik.com/devtools/winforms/controls/richtexteditor/import-export/docx/docxformatprovider 

- RadSpreadsheet: a control that enables you to easily open or save documents from the most common spreadsheet formats: https://docs.telerik.com/devtools/winforms/controls/spreadsheet/import-export 

Since each of the file formats has its own document specifics, a separate control is needed to properly show the document content. 

Converting different documents to an image is not purposed to be built-in functionality of the above mentioned controls. However, the possible approach that I can suggest in this case is to export the content of the respective control to a pdf file. Then, using the API that RadPdfViewer offers you can load the exported pdf document and generate the images for each page in the pdf: https://docs.telerik.com/devtools/winforms/controls/pdfviewer/export-to-image 

Please refer to the following help articles demonstrating how export the content in RadRichTextEditor and RadSpreadsheet to pdf:
https://docs.telerik.com/devtools/winforms/controls/richtexteditor/import-export/pdf/pdfformatprovider

https://docs.telerik.com/devtools/winforms/controls/spreadsheet/import-export 

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Panel
Asked by
Shanti 😎
Top achievements
Rank 2
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or