Showing a PDF file with the Browser component [message #1222626] |
Fri, 20 December 2013 23:15 |
|
We tried to show a PDF file (located on the server file system) with the Browser component, using
browser.setUrl("file:/...");
but had no success.
What are we doing wrong? Is there another way to do this?
Thank you
Vincenzo
|
|
|
|
Re: Showing a PDF file with the Browser component [message #1223737 is a reply to message #1223409] |
Tue, 24 December 2013 10:01 |
|
Hi Markus,
ok, this makes sense!
But then I have a question: in order to provide a download for this file I suppose I have to copy it into the deployed app folder structure (e.g. /var/tomcat/webapp/myapp/...). Is this correct or is it possible to register a resource outside of the application folder structure?
Considering that the file is coming from the Upload RAP component I suppose that I have to:
1) retrieve dinamically the deployed app folder
2) copy the uploaded file into a folder inside the deployed app structure
3) register it
4) open it with a http:// URL
Is this the correct way?
If yes how can I solve the point 1) ?
If not what is a more correct way?
Thank you very much
and Happy Chrismas!
Vincenzo
|
|
|
Re: Showing a PDF file with the Browser component [message #1224694 is a reply to message #1223409] |
Fri, 27 December 2013 13:57 |
|
Hi Markus,
I found this post, which was quite interesting:
http://www.eclipse.org/forums/index.php/mv/msg/34747/112842/#msg_112842
following this suggestion (that is: making a servlet provide the download stream for the document) we are able to use successfully the browser to show PDF as well as other kind of files.
So first of all we would like to know if this is a correct pattern.
However we are encountering a very strange problem, which is showing up just with PDF files (PNG or JPEG do not show this problem). It seems that every time a PDF is opened in this way, any Dialog or Hint (on mouse hover) goes 'under' (z-index) the PDF itself.
I am attaching images for showing the effect.
Any suggestion for solving this issue?
Thank you very much
Vincenzo
[Updated on: Fri, 27 December 2013 13:58] Report message to a moderator
|
|
|
|
Re: Showing a PDF file with the Browser component [message #1225074 is a reply to message #1224742] |
Sat, 28 December 2013 17:06 |
|
Hi Ralf,
thank you!
The problem is still there with IE 11, all ok instead with FF or Chrome.
It's indeed very annoying and it reach its worst behaviour when the dialog pops up completely under the pdf, so, being modal, the entire application is just frozen!
I tried to remove the pdf before a dialog is showed, but the user experience is so bad and however some error dialog may appear in an unpredictable way.
Is there a way (yes I am aware of the strange question and I know this is not related to RAP) to constrain dialogs to show in a given area/rectangle, so to avoid the overlapping with the browser widget?
Any suggestion is greatly appreciated!
Thank you
Vincenzo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03760 seconds