Hi all, Been banging my head against this for a little while so figured I see if anyone here could light the way. Our site receives input from fillable pdfs as XML (XFDF to be precise) and processes the information. We also need to be able to re-export the filled PDF. To do this you send the xfdf file with an href to the original pdf document. If I point the href to a static PDF (so, put it in the public folder) adobe opens and fills the pdf correctly. However, if I point to the pdf using a dynamic URL to rails then Adobe just doesn''t fill the pdf. So my question, what is the difference between http://localhost:3000/pdfs/TACServiceReport0908.pdf - where pdfs is a folder in the public folder of the app and http://localhost:3000/forms/show/4.pdf - this renders the exact same file using one of the following (I have tried them all) send_file(@form.pdf_filename, :type => ''application/pdf'', :dispoisition => ''attachment'') send_file(@form.pdf_filename, :type => ''application/pdf'', :dispoisition => ''inline'') send_data(content, :filename => filename, :type => "application/pdf", :disposition => "inline") send_data(content, :filename => filename, :type => "application/pdf", :disposition => "attachment") and how can I make the second method behave like the first. Thanks Simon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Simon Macneall wrote:> Hi all, > > Been banging my head against this for a little while so figured I see if > anyone here could light the way. > > Our site receives input from fillable pdfs as XML (XFDF to be precise) and > processes the information. We also need to be able to re-export the filled > PDF. To do this you send the xfdf file with an href to the original pdf > document. > > If I point the href to a static PDF (so, put it in the public folder) > adobe opens and fills the pdf correctly. However, if I point to the pdf > using a dynamic URL to rails then Adobe just doesn''t fill the pdf. > > So my question, what is the difference between > http://localhost:3000/pdfs/TACServiceReport0908.pdf - where pdfs is a > folder in the public folder of the app > and > http://localhost:3000/forms/show/4.pdf - this renders the exact same file > using one of the following (I have tried them all) > > send_file(@form.pdf_filename, :type => ''application/pdf'', :dispoisition => > ''attachment'') > send_file(@form.pdf_filename, :type => ''application/pdf'', :dispoisition => > ''inline'') >I''m sorry I can''t help you directly but is the above spelling error for disposition actually there in your code?> send_data(content, :filename => filename, :type => "application/pdf", > :disposition => "inline") > send_data(content, :filename => filename, :type => "application/pdf", > :disposition => "attachment") > > and how can I make the second method behave like the first. >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Thu, 09 Oct 2008 17:03:02 +0800, Mohit Sindhwani <mo_mail-RxrYI66vbj0AvxtiuMwx3w@public.gmane.org> wrote:> > Simon Macneall wrote: >> Hi all, >> >> > > I''m sorry I can''t help you directly but is the above spelling error for > disposition actually there in your code? >Yes it was, that wasn''t the problem though, once I set the :type to ''application/pdf'' it worked. Was sure that I had tried that at one stage, but apparently not. Thanks Simon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---