Solved

open a pdf file from my silverlight page

Posted on 2009-07-01
4
4,472 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Expert Comment

by:copyPasteGhost
ID: 24757852
0
 

Author Comment

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

Expert Comment

by:copyPasteGhost
ID: 24762730
0
 
LVL 14

Accepted Solution

by:
chinu1310 earned 500 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,
                                                        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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

705 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