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

Couldn't load pdf

1 Answer 96 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
mehmet
Top achievements
Rank 1
mehmet asked on 18 May 2012, 07:42 AM
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.

1 Answer, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 21 May 2012, 12:59 PM
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,
Kammen
the Telerik team

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

Tags
PDFViewer
Asked by
mehmet
Top achievements
Rank 1
Answers by
Kammen
Telerik team
Share this question
or