Open pdf (or doc or ?) in Silverlight Application

4 posts, 0 answers
  1. Steve Y
    Steve Y avatar
    115 posts
    Member since:
    Sep 2008

    Posted 02 Nov 2009 Link to this post


    I am investigating how feasable it is to convert a telerik application into a silverlight one. I really like the sl gridview and the in-place editing that this control offers. Plus, the tile control seems to be well suited to displaying related data in multiple grids with a grid per tile as the ux. The new sl native navigation looks fine (telerik, when will you offer a menu bar that interfaces into the ms navigation?).

    One part of my app allows upload of files (pdf, word and image primarily) from a local pc and then download and display of those files from the server. It's been put together using the treeview control. I have a context menu which allows upload and then clicking on a leaf node in the treeview control will open a radwindow and display (for example) the pdf file which opens in adobe reader automatically if the user chooses open from the dialog or saves it to the pc if the user chooses save.

     I've worked out how to do most things in sl but my inexperience is showing when it comes to being able to display those files. I've seen that there is a save dialog in sl so I can get the file down to the pc again. But, I can't find how to open the file in a 'radwidow like' control.

    I have two questions.

    1. Is it possible to open the file in a native sl window?

    2. If not, How can I open it in an window so I can use the normal functionality

    3. (ok, I have a third). Is there a better way of doing it that I haven't thought about?

  2. Ivan
    Ivan avatar
    519 posts

    Posted 06 Nov 2009 Link to this post

    Hi Steve,

    We are sorry for the late response - we just released the Q3.

    Actually you can try to open your Pdf files in the RadHtmlPlaceholder. Even more you can embed this html place holder inside the RadWindow. But please be aware the RadHtmlPlaceholder does not work in the OOB. You can find a Sample demo of the html-place-holder following these links:

    We think that the document uploading is achievable task too. Please preview our RadUpload for Silverlight. About the uploading from a context menu - we are not ready with such upload mechanism but we will do our best to solve the case.

    About the toolbar and the navigation - please tell us what is your deadline.

    About all other things like downloading files and save them to local drive etc. We can continue with them in other more specific threads. This way we will focus better on the case.

    One last point: to be able to attach files to your posts you should open a Support Ticket.

    Looking forward to hear back from you.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. tim David
    tim David avatar
    7 posts
    Member since:
    Oct 2009

    Posted 12 Nov 2009 Link to this post

    I need to put the PDF on SL,Using the Telerik HtmlPlaceHolder is OK,but if there are some controls can dock,The HtmlPlaceHolder cover the Docking controls.The following is my code.

    <telerikDocking:RadDocking >

                            <telerikDocking:RadDocumentPane Header="documentHostHead" Title="Document">
            <telerik:RadHtmlPlaceholder HorizontalAlignment="Left"
                                    x:Name="RadHtmlPlaceholder1" Visibility="Collapsed" />


                <telerikDocking:RadSplitContainer InitialPosition="DockedBottom">
                        <telerikDocking:RadPane Header="ToolBar" IsPinned="True" Foreground="White" Background="#FF005EDA">
             <RowDefinition Height="30"/>
             <RowDefinition Height="*"/>
            <StackPanel Background="#FF005EDA" Orientation="Horizontal">
             <Button Width="100" Height="25" Content="Expand All" />
             <Button Width="100" Height="25" Content="Close All" />
             <Button Width="100" Height="25" Content="Next Comment" >
             <Button Width="100" Height="25" Content="Up Comment" >
             <Button Width="100" Height="25" Content="Show Comment" >

    If I use the PDF uri instand of google page,I got the same problem,Can you deal with it sir!.I hope you  done it
    finally things.Can you read my words?

  4. Tihomir Petkov
    Tihomir Petkov avatar
    576 posts

    Posted 18 Nov 2009 Link to this post

    Hello Tim,

    The RadHtmlPlaceholder control uses an IFRAME element that is positioned above the Silverlight plugin to render its content. This means that if it overlaps with another visual element in the Silverlight application, the HtmlPlaceholder will always be on top. There is now workaround for that at the moment. It will be possible to avoid this issue in Silverlight 4 (the beta is available today), but until then there is not much we can do to improve this scenario.

    Will rendering a PDF in a RadWindow containing an HtmlPlaceholder work for you?

    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top