newbie :: Running script at client side

How can open a PDF/Document in browser from client m/c? Regards,

try opening the pdf file as binary data and send it with the 'send_data' function to the browser.

something like that should do the trick:

mime_type = 'application/pdf' filename = 'filename' extension = 'pdf' send_data(function_to_get_the_pdf_as_binary, :filename => "#{filename}.#{extension}", :type => mime_type, :disposition => 'inline')

calling this function should send the pdf to the browser. than you have a sercer side stored pdf opened on client. don't know if there's a better way. never used server stored pdf's with RoR. so perhaps somebody else can tell you a better way.

regards