I would like to know how to save a pdf file (generated with pdf-writer) in a local folder. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
pdf.save_as("public/yourdirector/" + whatevername + ".pdf") I think that should do On Mar 17, 6:56 pm, John Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I would like to know how to save a pdf file (generated with pdf-writer) > in a local folder. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
dhaval wrote:> pdf.save_as("public/yourdirector/" + whatevername + ".pdf") > I think that should do > > On Mar 17, 6:56 pm, John Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>I have this code to generate the pdf: format.pdf do send_data RepairTicketDrawer.draw(@repair_ticket), :filename => ''repair_tickets/@repair_ticket.id.pdf'', :type => ''application/pdf'', :disposition => ''inline'' end How can I save it? I can''t just put pdf.save. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
John Smith wrote:> dhaval wrote: >> pdf.save_as("public/yourdirector/" + whatevername + ".pdf") >> I think that should do >> >> On Mar 17, 6:56 pm, John Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > I have this code to generate the pdf: > format.pdf do > send_data RepairTicketDrawer.draw(@repair_ticket), :filename => > ''repair_tickets/@repair_ticket.id.pdf'', :type => ''application/pdf'', > :disposition => ''inline'' > end > > How can I save it? I can''t just put pdf.save.Ok, it''s already done. I have to use this method in the Drawer. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---