This is a migrated thread and some comments may be shown as answers.

Cannot load document

0 Answers 22 Views
PDFViewer
This is a migrated thread and some comments may be shown as answers.
Nebojsa
Top achievements
Rank 1
Nebojsa asked on 03 Feb 2014, 09:58 AM
Hi,
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

No answers yet. Maybe you can help?

Tags
PDFViewer
Asked by
Nebojsa
Top achievements
Rank 1
Share this question
or