Load PDF from URL

2 posts, 0 answers
  1. Art Kedzierski
    Art Kedzierski avatar
    107 posts
    Member since:
    Nov 2009

    Posted 10 Sep 2013 Link to this post

    I'm not quite understanding the documentation and I'm hoping you can provide an example. I need to attach a RadPDFViewer to a PDF that resides out on our internal network. I don't want to include it in the app as a resource as it is updated frequently (it's a help document). It's URL never changes, however. What's the best way to do that in an MVVM scenario? Is there a XAML only solution?
  2. Alexander
    Alexander avatar
    41 posts

    Posted 13 Sep 2013 Link to this post

    Hi Art,

    There are both MVVM and XAML solutions to your problem. Note that in order to read a document from a remote stream, the stream must support Read and Seek operations.

    The XAML only solution requires setting the DocumentSource property of the RadPdfViewer to the URI which points to the stream of the document. 

    I'm attaching a sample project, which demonstrates the MVVM approach. In the path variable in MainPage.xaml.cs you need to set the path to the stream.

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

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. DevCraft R3 2016 release webinar banner
Back to Top