DocumentSource Problem

2 posts, 0 answers
  1. hrn
    hrn avatar
    1 posts
    Member since:
    Feb 2014

    Posted 19 Feb 2014 Link to this post


    i have a problem with radpdfviewer. You can look attach pictures. I want to read GelenEvrak/Kitap.pdf but i cant open in radpdfviewer. how am i read it
  2. Alexander
    Alexander avatar
    41 posts

    Posted 21 Feb 2014 Link to this post


    Thank you for contacting us.
    You can read this article which explains how to show a file in RadPdfViewer.  The following code snippet shows how to load a file embedded as a resource:
    private void LoadFromStream(object sender, System.Windows.RoutedEventArgs e)
        Stream str = App.GetResourceStream(new System.Uri("PdfViewerDemo;component/SampleData/Sample.pdf", System.UriKind.Relative)).Stream;
        this.pdfViewer.DocumentSource = new PdfDocumentSource(str);
    You also need to set the Build Action of the document you want to load to "Resource".

    I hope this is helpful. Please, do not hesitate to contact us if you have any other questions.

Back to Top