Ticket #540 (closed enhancement: fixed)
Add option to print servlet to not add Content-disposition: attachment header
|Reported by:||ahocevar||Owned by:||jeichar|
Internet Explorer with Adobe Reader installed makes it hard to download a pdf due to security restrictions. It issues a warning ("To help protect your security, Internet Explorer blocked this site from downloading files to your computer. Click here for options..."), and if "Download File..." is selected, the page gets reloaded.
Although we generally prefer to get the PDF as download, it would be nice to use the Adobe Reader plugin in this case, which at least displays the PDF inline.
The attached patch adds a request parameter "inline", which, if set to true, makes the servlet not set the Content-disposition: attachment header.
The way to make downloading the PDF work in all browsers, as implemented in the Geo Ext? print ux, is the following: http://trac.geoext.org/browser/sandbox/ahocevar/playground/ux/Printing/ux/data/PrintProvider.js?rev=1606#L313