1 Replies - 2576 Views - Last Post: 19 July 2013 - 08:39 AM

#1 coolandy  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 15
  • Joined: 23-September 11

MonoDevelop: Webkit# webview browser not working for PDF links (Linux)

Posted 12 July 2013 - 09:30 AM

MonoDevelop: Webkit# webview browser not working for PDF links

When I click hyperlinks which are PDF documents using the WebView control (Webkit#), nothing happens in error.

I get these repetitive debug messages:
** (gtk_test:2818): DEBUG: NP_Initialize
** (gtk_test:2818): DEBUG: NP_Initialize succeeded

Why is this? I do not appear to get any link from NavigationRequested event.

Basically I intend to capture the PDF link, download the document and then call another program (C++) to open the PDF document via Foxit SDK (already written this).

Note my operating system is Centos 6.4 Linux.

Thanks,

Andrew


Is This A Good Question/Topic? 0
  • +

Replies To: MonoDevelop: Webkit# webview browser not working for PDF links (Linux)

#2 coolandy  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 15
  • Joined: 23-September 11

Re: MonoDevelop: Webkit# webview browser not working for PDF links (Linux)

Posted 19 July 2013 - 08:39 AM

Solved with this code class:
		public class WebBrowser: WebView
		{
			public WebBrowser()
			{
				this.NavigationRequested += this.OnLinkActivatedInBrowser;
			}		
			
			public string url_address;
		
		    protected virtual void OnLinkActivatedInBrowser (object sender, NavigationRequestedArgs args)
            {
                string uri = args.Request.Uri;
		
				Console.WriteLine("navigation requested [{0}]",uri);
			
				url_address = uri;
            }

		}



Andrew
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1