RE: [Rails] send_file pdf problem


Which webserver? I spent quite a lot of time on this issue last year.

I finally installed Apache 1.3.36, 2.0.48, 2.0.49, 2.0.58, and 2.2.2
from source, the installed Suse 2.0.48, along with lighttpd 1.4.11 and
tested them all. As I recall, the problem stemmed mostly from the
2.0.48 distributed by Suse, and lighty. Also, the user had to have been
using IE6, and the Acrobat Reader setting had to be to open the PDF in
the same window as Explorer.

Here is the lighty config file fix:
$HTTP["url"] =~ "\.pdf$" {
   server.range-requests = "disable"

Which disallows range requests. The drawback is that the user will have
to download the complete PDF file before they can view it, but it does
eliminate the problem.

I think there is more relevant data here:


Rich Duzenbury