Quantcast
Channel: Open pdf files on a web page
Viewing all articles
Browse latest Browse all 2

Open pdf files on a web page

$
0
0

 

Hello,

 

I am trying to develop a search browser with WPF, that must alow users to open pdf urls file in the current window.

I'm using a window with a Frame control in witch the web page is going to be loaded.

 

My application have two windows:

the first is a listbox witch is fill with the search results.

the second shows the webpage that the user will select from the result listbox, and is something like this:

 

 

<

Window x:Class="Prototipo.Browser"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

Title="Browser" Width="803" Height="500"

>

<

Grid.RowDefinitions>

<RowDefinition Height="128*" />

<RowDefinition Height="334*" />

</Grid.RowDefinitions>

<

Frame Margin="0,74,0,0" Name="HtmlContent" Grid.RowSpan="2" />

 

</

Grid>

</

Window>

 

code behind:

 

public

partialclassBrowser : Window

{

publicString URL

{

    

set {

this.HtmlContent.Source= newUri(value);

}

get { returnthis.HtmlContent.Source.AbsoluteUri;}

}

.....

 

this window is created in the first window of my application like this, :

Browser

b = newBrowser();

b.URL = "my search result site";

b.show();

 

When a click on a link to a pdf file on the web page loaded in my Frame i get this exception:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

 

Related to this exception i have found this post :

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2722626&SiteID=1

 

but it seems to me that the subjects aren't related by any way

 i'm developing in VS2008, and my OS is windows vista bussiness edition.

 

Back to the application, the diference ( seems to me ) between my application and the one's that i found, is that i have no way to reach the pdf link that is on the web page that is loaded into the frame, for that reason i can´t build the html wrapper with the link associated.

 

any ideias that can help me with my problem ?

 

 

Thanks,

Vítor

 

 

 

 

 

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images