Cannot load document

1 posts, 0 answers
  1. Nebojsa
    Nebojsa avatar
    18 posts
    Member since:
    Feb 2010

    Posted 03 Feb 2014 Link to this post

    Can You please tell me why this code is not working. In code behind:
    private void Button_Click(object sender, RoutedEventArgs e)
                OpenFileDialog ofd = new OpenFileDialog();
                ofd.Filter = "Pdf-Dateien (*.pdf)|*.pdf";
                if (ofd.ShowDialog() == true)
                    this.documentStream = new FileStream(ofd.FileName, FileMode.Open);
                    RadFixedDocument doc = new PdfFormatProvider(this.documentStream, FormatProviderSettings.ReadOnDemand).Import();
                    this.pdfViewer.Document = doc;
    and in XAML:
    <telerik:RadPdfViewer Grid.Row="1" x:Name="pdfViewer" Grid.ColumnSpan="2"/>
    System report no errors, simply nothing is showing in viewer.

    Best Regards
    Nebojsa Danilovic
Back to Top