How to assign/display byte[] into RadEditor

2 posts, 0 answers
  1. Nirav
    Nirav avatar
    7 posts
    Member since:
    Jun 2014

    Posted 15 Oct 2014 Link to this post

    I am using "UI for ASP.Net AJAX Q2 2014", Telerik.Web.UI.dll version is 2014.2.618.45, Visual studio 2013 and developing a website.
    One of my requirement is to display pdf file with Agree/Do not Agree buttons. 
    I am thinking to display pdf file contents in RadEditor ( editing disabled ).
    I have pdf file stored into SQL Server database field and I am reading from database and converting to byte[].
    Now I want to assign this byte[] to RadEditor so that it displays pdf text as it is with formatting. 
    Can you tell me how should I assign byte[] to RadEditor to display that text? 

    I will disable editing to it will just look like text, and will provide Agree/Do not agree button so I can capture button click and go accordingly. 
    I will be putting this RadEditor in a webform, with above buttons, and will open up that form as Modal form using RadWindow, so user will need to click Agree to continue process. 

    Thanks in advance, 

  2. Marin Bratanov
    Marin Bratanov avatar
    4837 posts

    Posted 17 Oct 2014 Link to this post

    Hi Nirav,

    RadEditor is an XHTML editor, so it cannot display a PDF. It can take a simple string (which can contain HTML markup) for its Content, but it cannot take an array representation of a file. Also, if you need buttons that invoke server actions, they should be outside of the editor so they can POST the form.

    What I can suggest is opening your PDF file in the RadPdfViewer for Silverlight: You can also consider other viewer options like the PDF.js library from Firefox and this blog can help you get started with it:


    Marin Bratanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top