Solved

open a pdf file from my silverlight page

Posted on 2009-07-01
4
4,389 Views
Last Modified: 2013-11-12
How can i open a pdf file from my silverlight page? I have pdf data as memorystream.
Any help will be really appreciated..
0
Comment
Question by:x1877
  • 2
4 Comments
 
LVL 13

Expert Comment

by:copyPasteGhost
Comment Utility
0
 

Author Comment

by:x1877
Comment Utility
Thanks Ghost, but now only looking for native code not 3rd party solutions.
0
 
LVL 13

Expert Comment

by:copyPasteGhost
Comment Utility
0
 
LVL 14

Accepted Solution

by:
chinu1310 earned 500 total points
Comment Utility
In this case you can do as below.
1) Store coming memory stream as pdf file on your silverlight host project return name to silverlight client
2) From your silverlight application navigate to that pdf url. Required code snippet is attached

Hope it helps
string hostUrl = absolutUrl.Replace(System.Windows.Browser.HtmlPage.Document.DocumentUri.LocalPath,

                                                        item.ResourceUrl);

                    System.Windows.Browser.HtmlPage.Window.Navigate(

                        new Uri(hostUrl, UriKind.Absolute), 

                        "_blank", "toolbar=no,location=yes,status=no,menubar=yes,resizable=yes");

Open in new window

0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
optimize  c# code 7 48
Convert string to date 3 39
String manipulation 15 49
What .NET website keeps me current? 9 28
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now