Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » View PDF document using Browser in Linux
View PDF document using Browser in Linux [message #92437] Mon, 09 June 2008 18:18 Go to next message
Eclipse UserFriend
Originally posted by: mj.kwak.interfacemgmt.com

Hi,

I am creating a project that views pdf documents using Browser in Linux.
I'm using the following method.

browser.setUril("file:///"+filepath+filename);

This is working well in the Windows XP. But in Linux I have following
error message. Someone has the same error?

Thanks.

---------------------------------------
Could not evaluate javascript response:

[Exception... "Access to restricted URI denied" code: "1012" nsresult:
"0x805303f4 (NS_ERROR_DOM_BAD_URI)" location:
"http://hostname:port/test/rap?startup=default Line: 198"]

org.eclipse.swt.EventUtil.suspendEventHandling();
var req = org.eclipse.swt.Request.getInstance();
req.setRequestCounter( "10" );
var wm = org.eclipse.swt.WidgetManager.getInstance();
var w = wm.findWidgetById( "w44" );
w.setSpace( 0, 1049, 0, 20 );
var w = wm.findWidgetById( "w156" );
w.setSource( "file:////usr/tomcat/pdf/test.pdf" );
var w = wm.findWidgetById( "w19" );
w.setTabIndex( 23 );
w.setSelectionForeground( "#ffffff" );
w.setSelectionBackground( "#316ac5" );
var w = wm.findWidgetById( "w22" );
w.setTabIndex( -1 );
w.setSelectionForeground( "#000000" );
w.setSelectionBackground( "#ffffff" );
org.eclipse.swt.WidgetManager.getInstance().focus( "w82" );
qx.ui.core.Widget.flushGlobalQueues();
org.eclipse.swt.EventUtil.resumeEventHandling();
Re: View PDF document using Browser in Linux [message #92488 is a reply to message #92437] Tue, 10 June 2008 07:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hi,

seems as if you're opening files from the user's local filesystem.
Actually I'm surprised that this works under windows. But anyway I guess
it's nothing RAP can do about, whether this works or not depends on the
security settings of your system/browser.


Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: MJ [mailto:mj.kwak@interfacemgmt.com]
Bereitgestellt: Montag, 9. Juni 2008 20:18
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: View PDF document using Browser in Linux
Betreff: View PDF document using Browser in Linux

Hi,

I am creating a project that views pdf documents using Browser in Linux.
I'm using the following method.

browser.setUril("file:///"+filepath+filename);

This is working well in the Windows XP. But in Linux I have following
error message. Someone has the same error?

Thanks.

---------------------------------------
Could not evaluate javascript response:

[Exception... "Access to restricted URI denied" code: "1012" nsresult:
"0x805303f4 (NS_ERROR_DOM_BAD_URI)" location:
"http://hostname:port/test/rap?startup=default Line: 198"]

org.eclipse.swt.EventUtil.suspendEventHandling();
var req = org.eclipse.swt.Request.getInstance();
req.setRequestCounter( "10" );
var wm = org.eclipse.swt.WidgetManager.getInstance();
var w = wm.findWidgetById( "w44" );
w.setSpace( 0, 1049, 0, 20 );
var w = wm.findWidgetById( "w156" );
w.setSource( "file:////usr/tomcat/pdf/test.pdf" );
var w = wm.findWidgetById( "w19" );
w.setTabIndex( 23 );
w.setSelectionForeground( "#ffffff" );
w.setSelectionBackground( "#316ac5" );
var w = wm.findWidgetById( "w22" );
w.setTabIndex( -1 );
w.setSelectionForeground( "#000000" );
w.setSelectionBackground( "#ffffff" );
org.eclipse.swt.WidgetManager.getInstance().focus( "w82" );
qx.ui.core.Widget.flushGlobalQueues();
org.eclipse.swt.EventUtil.resumeEventHandling();
Re: View PDF document using Browser in Linux [message #92958 is a reply to message #92488] Wed, 11 June 2008 20:37 Go to previous message
Eclipse UserFriend
Originally posted by: mj.kwak.interfacemgmt.com

Hi Frank,

I see. Thanks a lot. Anyway now I can see pdf document using Browser and
http url under Linux.
Previous Topic:Where to register IPartListener2??
Next Topic:New RAP Client - where to start?
Goto Forum:
  


Current Time: Sat Apr 20 01:15:42 GMT 2024

Powered by FUDForum. Page generated in 0.03610 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top