Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

RadPDFViewer is not loading pdf document

$
0
0

Hi,

I am using RadPdfViewer control from dll Telerik.WinControls.PdfViewer, version 2015.2.623.20 to load pdf document and print the same.

I have DocumentLoaded event handler in my code to show successful load message.

but, RadPdfViewer.LoadDocument method is not loading any pdf file (neither from stream object nor string file path) and not hitting the DocumentLoaded event handler.

below is the code:

try
{
Stream stream;
RadPdfViewer pdfViewer;
stream = File.OpenRead(docPath);
pdfViewer = new RadPdfViewer();
pdfViewer.DocumentLoaded += pdfViewer_DocumentLoaded;
pdfViewer.LoadDocument(stream);
}
catch (Exception ex)
{
throw;
}

After execution of line "pdfViewer.LoadDocument(stream);" it comes down straight without hitting event handler pdfViewer_DocumentLoaded.

Checked pdfViewer.Document property and it comes as null.

Please let me know If I am doing something wrong.

 

Thanks,

Abhinav


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>