Unable to stream the Pdf file

2 posts, 0 answers
  1. Rekha
    Rekha avatar
    2 posts
    Member since:
    Dec 2011

    Posted 02 Dec 2011 Link to this post

    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
  2. Kammen
    Kammen avatar
    312 posts

    Posted 05 Dec 2011 Link to this post

    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.

    the Telerik team

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

  3. DevCraft banner
Back to Top