Unfortunately, displaying PDF files in Silverlight is still quite limited. You can use the HtmlPlaceHolder to display them but you will need to store the files on the server.
I hope this information will help you. If you need more, please let us know.
All the best,
Tina Stancheva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
PDF streams are binary data, so that wouldn't work. I don't think there is a way to display a pdf (using the browsers adobe plugin) from a stream without a uri right?
This below won't work.
string text = Convert.ToBase64String(myPDFStream.ToArray());
htmlPlaceholder1.HtmlSource = text;
It only accepts a string right. Adding header information isn't going to help. This can't be done with the silverlight5 webbrowser either I'm guessing. I guess the best thing to do is stream it from a web service, but that's an extra step if I'm creating the pdf on the silverlight level to take a load off the server.
The telerik silverlight pdf viewer is having problems printing my document, so I'm using the adobe browser plugin for now.
0
Petar Mladenov
Telerik team
answered on 06 Jul 2012, 10:08 AM
Hello danparker276 ,
Yes you are right, the code you provided won't work. The HtmlPlaceholder cannot accept use such string converted from stream.
Greetings,
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>