Anyone used acts_as_flying_saucer? problem with pdf_file

hey all

I’m trying to use the plugin acts_as_flying_saucer, which converts html
(well, xhtml, strictly speaking) to pdf.

It works if i choose the method which saves a file to my local hd, but
it doesn’t work if i choose the method which sends a file to the
browser: the file that comes through has a size of 1 byte and can’t be

I’m following the examples on the above page and as far as i know have
checked all the right boxes. Here’s my code -

This works:

    render_pdf :template => 'school_subscribers/show_pdf',
               :pdf_file => '/home/max/Desktop/saved.pdf'

And this doesn’t work (sends an empty file):

    render_pdf :template => 'school_subscribers/show_pdf',
               :send_file => { :filename => "pushed.pdf" }

Does anyone have any experience with, or insight into, this by any


Tracked this down to a problem with x_sendfile - i needed to set it to
false in order to get it working. Here’s my current call:

render_pdf :template => ‘school_subscribers/show_pdf’,
:send_file => { :filename => filename,
:x_sendfile => false,
:disposition => “inline”,
:type => “application/pdf”}

I don’t know why x_sendfile is going wrong - it misbehaves the same way
in my local single mongrel setup, my local apache&mongrel setup and our
staging server which is apache with multiple mongrels. I don’t know
much about x_sendfile but even my much more knowledgeable colleague is