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.

Reply via email to