I want to make a PDF document reader, and the only thing I've found to help me is "Amyuni PDF Suite" that will turn the PDF into XAML and stream that. Are there any other controls for displaying PDFs in Silverlight? Or could I add an IFrame into Silverlight and let the client render it?
Cheers
Nik
Or could I add an IFrame into Silverlight and let the client render it?
Silverlight doesn't really have that capability. You can make your Silverlight control transparent, and have an HTML div block that sits above your Silverlight control, which you could then load a PDF in, but as for displaying a PDF within Silverlight, I think you're out of luck.
Edit: This question has some info on how to accomplish transparent Silverlight controls, I hope it helps!
If you're ok with buying the pdf converter you can do something like this:
CanvasObject.Children.Add(XamlReader.Load("xaml string from pdf converter"));
And the pdf should be rendered inside your CanvasObject.
I really think you'll get the best result with some type of conversion to XAML. I imagine it can't be that hard to write the converter yourself, I might be wrong though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With