Re: Embed pdf into gwt app

2011-08-16 Thread Papick G. Taboada
Hi Karim,

You are right, I know that. But in fact that is exactly what I want: the
browser to use whatever plugin to show the PDF, my app to define a little
place where this happens.

I have several problems actually:

Whatever I use, the PDF gets downloaded. In my case it is the tool folx,
without it is acrobat or preview that gets fired. Yes, in ffox I can
configure the behavior. I would like to force to be embedded and provide a
link for download. This makes more sense and in my case leads to a better
user experience when searching for a specific document.

When I use the object tag (uibinder, objectelement) and set the data URL
from my presenter, the app jumps back in history and the PDF gets
downloaded.

Brgds

Papick G. Taboada
+++
   pgt technology scouting GmbH
   http://pgt.de


Am 15.08.2011 um 23:39 schrieb karim duran karim.du...@gmail.com:

Hi Papick,

In my opinion, the problem is not about your iframe or any GWT container.
Concerning object or embed, i think you should use the standard way
provided by W3C specifications e.g object.

GWT provides cross-browser support for rendering. But don't process
media-type rendering.

Remember that if your browser can find a plugin to display a media-type (PDF
in your case), the media-type will display in your browser as you expect.

If your browser can't find a plugin, it calls the system default application
for this media-type ( Adobe Reader for exemple in your case with PDF ).

But, from the point of view of the user of your application, *you don't have
any control on how his browser will behave*. I mean that when the user
browser meet the object tag, it can display the PDF as you expect because
the Adobe Reader plugin is on the user system; Or it can call the Adobe
Reader desktop application because the plugin is not available for his
browser.

In firefox, you can force the behavior for a media-type. Go to - preference
- application, and search PDF document. You can see many actions the
browser can provide. You can choose the one interesting you.

to know about installed plugins for your browser, just type url
about:plugins.

Regards.

Karim Duran


2011/8/15 P.G.Taboada pgtabo...@googlemail.com

 hello,

 I am tryring to display PDF files in my app. Unfortunately, Firefox
 and Safari are downloading the PDF instead of showing them embedded.

 I tried object and embed and an iframe element, the PDF always
 gets downloaded. When using embed or object it even messes with the
 history, the app get thrown back in history (I am using Places/MVP).

 Did anyone succeed in showing a PDF?

 Brgds,

 Papick

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


 --
You received this message because you are subscribed to the Google Groups
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Embed pdf into gwt app

2011-08-15 Thread karim duran
Hi Papick,

In my opinion, the problem is not about your iframe or any GWT container.
Concerning object or embed, i think you should use the standard way
provided by W3C specifications e.g object.

GWT provides cross-browser support for rendering. But don't process
media-type rendering.

Remember that if your browser can find a plugin to display a media-type (PDF
in your case), the media-type will display in your browser as you expect.

If your browser can't find a plugin, it calls the system default application
for this media-type ( Adobe Reader for exemple in your case with PDF ).

But, from the point of view of the user of your application, *you don't have
any control on how his browser will behave*. I mean that when the user
browser meet the object tag, it can display the PDF as you expect because
the Adobe Reader plugin is on the user system; Or it can call the Adobe
Reader desktop application because the plugin is not available for his
browser.

In firefox, you can force the behavior for a media-type. Go to - preference
- application, and search PDF document. You can see many actions the
browser can provide. You can choose the one interesting you.

to know about installed plugins for your browser, just type url
about:plugins.

Regards.

Karim Duran


2011/8/15 P.G.Taboada pgtabo...@googlemail.com

 hello,

 I am tryring to display PDF files in my app. Unfortunately, Firefox
 and Safari are downloading the PDF instead of showing them embedded.

 I tried object and embed and an iframe element, the PDF always
 gets downloaded. When using embed or object it even messes with the
 history, the app get thrown back in history (I am using Places/MVP).

 Did anyone succeed in showing a PDF?

 Brgds,

 Papick

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Embed pdf into gwt app

2011-08-15 Thread Ivan Pulleyn
Depending on your requirements, you may find the pdfjs project useful:

http://andreasgal.github.com/pdf.js/

Ivan...

On Tue, Aug 16, 2011 at 5:38 AM, karim duran karim.du...@gmail.com wrote:

 Hi Papick,

 In my opinion, the problem is not about your iframe or any GWT container.
 Concerning object or embed, i think you should use the standard way
 provided by W3C specifications e.g object.

 GWT provides cross-browser support for rendering. But don't process
 media-type rendering.

 Remember that if your browser can find a plugin to display a media-type
 (PDF in your case), the media-type will display in your browser as you
 expect.

 If your browser can't find a plugin, it calls the system default
 application for this media-type ( Adobe Reader for exemple in your case with
 PDF ).

 But, from the point of view of the user of your application, *you don't
 have any control on how his browser will behave*. I mean that when the
 user browser meet the object tag, it can display the PDF as you expect
 because the Adobe Reader plugin is on the user system; Or it can call the
 Adobe Reader desktop application because the plugin is not available for his
 browser.

 In firefox, you can force the behavior for a media-type. Go to -
 preference - application, and search PDF document. You can see many actions
 the browser can provide. You can choose the one interesting you.

 to know about installed plugins for your browser, just type url
 about:plugins.

 Regards.

 Karim Duran


 2011/8/15 P.G.Taboada pgtabo...@googlemail.com

 hello,

 I am tryring to display PDF files in my app. Unfortunately, Firefox
 and Safari are downloading the PDF instead of showing them embedded.

 I tried object and embed and an iframe element, the PDF always
 gets downloaded. When using embed or object it even messes with the
 history, the app get thrown back in history (I am using Places/MVP).

 Did anyone succeed in showing a PDF?

 Brgds,

 Papick

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-toolkit@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Embed pdf into gwt app

2011-08-14 Thread P.G.Taboada
hello,

I am tryring to display PDF files in my app. Unfortunately, Firefox
and Safari are downloading the PDF instead of showing them embedded.

I tried object and embed and an iframe element, the PDF always
gets downloaded. When using embed or object it even messes with the
history, the app get thrown back in history (I am using Places/MVP).

Did anyone succeed in showing a PDF?

Brgds,

Papick

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Embed pdf into gwt app

2011-08-14 Thread Jeff Chimene
On 08/14/2011 04:34 PM, P.G.Taboada wrote:
 hello,
 
 I am tryring to display PDF files in my app. Unfortunately, Firefox
 and Safari are downloading the PDF instead of showing them embedded.
 
 I tried object and embed and an iframe element, the PDF always
 gets downloaded. When using embed or object it even messes with the
 history, the app get thrown back in history (I am using Places/MVP).
 
 Did anyone succeed in showing a PDF?
 
 Brgds,
 
 Papick
 

The way I've done this in the past is via an iframe. Split the screen,
and set the iframe url to your pdf generator's url.

The gotcha is that you want a custom emitter on your host. IOW, you
can't just go to example.com/file.pdf You'll probably need something
like example.com/emit.cgi?file=file.pdf

The custom emitter will set the mime type to application/pdf Then
things should work on the browser as you expect (except the URL is the
emitter url, not the file url)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.