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
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
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
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.