Couldn't load pdf

2 posts, 0 answers
  1. mehmet
    mehmet avatar
    6 posts
    Member since:
    Jul 2011

    Posted 18 May 2012 Link to this post

    Hello everyone ,

    I have a problem that when a staticaly wrote documentSource as
    <telerik:RadPdfViewer x:Name="viewer1" Margin="0" DocumentSource= "..b14314.pdf" />

    there is no problem , and works correcty .

    But I have to pass the path which is dynamically changed  as a a parameter from my computer , 

    Since I use a gridview for my datas and every data has own pdf doc.

    So I have to show the pdf file  according to selected row in gridview.

    -- Can anybody help me passing document source path , passing from code behind .?

    Thx in advance.
  2. Kammen
    Kammen avatar
    314 posts

    Posted 21 May 2012 Link to this post

    Hello Mehmet,

    In Silverlight, it will not be possible to open a PDF file by specifying the file path from your computer. This is due to the security policy of Silverlight, which allows opening files from the client machine only through the OpenFileDialog.

    When it comes to opening a file that is added to the project as a resource, you can find more information about that in this article. You can also open documents from a stream, as long as the stream supports read and seek operations, as noted in the online help.

    I hope this answers your question.

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top