-
28 Sep 2009 11:48 PM #1
Sending PDFs to the client. Best Practice?
Sending PDFs to the client. Best Practice?
Hello,
I have a process on the server that dynamically generates PDFs, the details of how it is done are not relevant to my question...
I would like to send the PDF byte stream back to the client (setting the reponse content type to pdf with
) and display it in a new browser window which would open the pdf document in the PDF viewer. An even better way of doing this would be to open the PDF document in the pdf viewer within a GXT Window object.Code:response.setContentType("application/pdf");
Has anyone done this before with GXT? Any ideas / best practice on how to implement this functionality?
Any help greatly appreciated. Thanks
Francesco
-
29 Sep 2009 1:29 AM #2
within an iframe? (Frame.java or FramePanel.java)
but note: not every browser display it inline. some open it externaly, and also if you have a pdf plugin in firefox you can decide how to open it ( https://addons.mozilla.org/firefox/addon/636 )This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.
GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041
-
29 Sep 2009 1:40 AM #3
this media component (also with PDF) is only in ExtJs available, but not in GXT:
[UPDATED] ux.Media[.Flash/Flex] Components 2.1.2
http://www.extjs.com/forum/showthread.php?t=23983This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.
GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041
-
29 Sep 2009 8:24 PM #4
Thanks for the tips so far!


Reply With Quote