Ticket #540 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Add option to print servlet to not add Content-disposition: attachment header

Reported by: ahocevar Owned by: jeichar
Priority: major Milestone: 1.3 Release
Component: print Version: SVN
Keywords: Cc:
State: Commit

Description

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

Attachments

mapfish-540.patch (2.9 kB) - added by ahocevar 3 years ago.

Change History

Changed 3 years ago by ahocevar

Changed 3 years ago by elemoine

  • state changed from Review to Commit
  • milestone set to 1.3 Release

Looks good. Thanks for the patch.

Changed 3 years ago by elemoine

  • status changed from new to closed
  • resolution set to fixed

(In [3331]) Add option to print servlet to not add Content-disposition: attachment header, p=ahocevar (closes #540)

Note: See TracTickets for help on using tickets.