Unable to Load the PDF

3 posts, 0 answers
  1. Ramesh
    Ramesh avatar
    22 posts
    Member since:
    Oct 2013

    Posted 27 Nov 2013 Link to this post

      Hi ,

    I am using  RadPdfViewe but unable to load the PDF .

    Iam following bellow link http://www.telerik.com/help/silverlight/radpdfviewer-showing-a-file.html for reference


    my requirment is I have a PDF file in C:\Ramesh\Books\Sample.pdf .

    How can I load it  when I click on a button .


    Bellow is my code kindly help me .



     

    <UserControl x:Class="PDFViewerTelerikDemoMVVM.MainPage"
        xmlns:x=6/xaml"
                  
                 xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d"
        d:DesignHeight="300" d:DesignWidth="400">
     
        <Grid x:Name="LayoutRoot" Background="White">
     
            <telerik:RadPdfViewer x:Name="pdfViewer" DocumentSource="PDFViewerTelerikDemoMVVM;component/SampleData/Pro.Silverlight.5.in.CSharp.4th.Edition.pdf"  Height="Auto" Width="Auto"/>
     
            <!--DocumentSource="PDFViewerTelerikDemoMVVM;component/SampleData/Pro.Silverlight.5.in.CSharp.4th.Edition.pdf"-->
     
        </Grid>
    </UserControl>

  2. Svetoslav
    Admin
    Svetoslav avatar
    55 posts

    Posted 29 Nov 2013 Link to this post

    Hello Ramesh,

    Thank you for contacting us!

    Due to limitation of Silverlight, the file system is a subject of security restrictions. That is why you cannot open a file (in your case "C:\Ramesh\Books\Sample.pdf" ) from your local drive without using Open File Dialog. As far as our research shows, out-of-browser applications with elevated trust might allow you access to such files. 

    In order to make the code you sent us work and load a file with Path PDFViewerTelerikDemoMVVM;component/SampleData/Pro.Silverlight.5.in.CSharp.4th.Edition.pdf you need to set the Build Action property of the pdf file to Resource.

    Don't hesitate to contact us again!

    Regards,
    Svetoslav
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    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 banner
  4. Ramesh
    Ramesh avatar
    22 posts
    Member since:
    Oct 2013

    Posted 04 Dec 2013 Link to this post

    Hi ,

    Thank you so much it is working fentastic
Back to Top