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

Unable to stream the Pdf file

1 Answer 92 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Rekha
Top achievements
Rank 1
Rekha asked on 02 Dec 2011, 05:55 PM
I have been tried to stream the pdf file by using the code:

Stream str = App.GetResourceStream(new System.Uri("PdfViewerDemo;component/SampleData/Sample.pdf",System.UriKind.Relative)).Stream;
    this.pdfViewer.DocumentSource = new PdfDocumentSource(str);

But. I am unable to get it.

Can you please explain in detail how to stream the pdf file which is in SampleData folder in client application

1 Answer, 1 is accepted

Sort by
0
Kammen
Telerik team
answered on 05 Dec 2011, 09:58 AM
Hello Rekha,
Please make sure the "Build Action" for the PDF file is set to "Resource" in the project file. Another possible reason could be that the document in not supported - as the RadPdfViewer is still in beta, there are some documents it cannot open. Can you open it with the Open File Dialog from the Open button in the built-in toolbar?
If not, you could send us the document so we can investigate it further. You will be able to attach a file if you open a support ticket through your account.
Looking forward to your reply.

Greetings,
Kammen
the Telerik team

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

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