open a pdf file from my silverlight page

Posted on 2009-07-01
Medium Priority
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..
Question by:x1877
  • 2
LVL 13

Expert Comment

ID: 24757852

Author Comment

ID: 24758112
Thanks Ghost, but now only looking for native code not 3rd party solutions.
LVL 13

Expert Comment

ID: 24762730
LVL 14

Accepted Solution

chinu1310 earned 2000 total points
ID: 24840302
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,
                        new Uri(hostUrl, UriKind.Absolute), 
                        "_blank", "toolbar=no,location=yes,status=no,menubar=yes,resizable=yes");

Open in new window


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
Suggested Courses

597 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