When the user clicks a link, i want to merge the current customers details into a word document (*.doc) and return it to the user as a download. Does anybody have any ideas on what the best way to do it is? I''m racking my brains trying to think of the best way to do this. My ideal scenario : 1. User searches for customer 2. User selects which type of document to open, e.g. Reminder Letter 3 3. Browser sends the user a doc file, with the customers details already in the address part, ready for editing/printing. ANy ideas welcome Thanks Chris -- 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 -~----------~----~----~----~------~----~------~--~---
Patrick Doyle
2008-Mar-03 00:57 UTC
Re: Performing a mail merge using rails and ? any ideas?
This probably doesn''t help much, but would a PDF document be acceptable instead of a Word document? I recall reading about a package that produces PDFs from within PHP scripts.... here''s the ref from the book: http://sourceforge.net/projects/pdf-php/. I have no idea if such a beast exists for RoR (having a grand total of about 5 days of experience in the field myself), but I would be interested in learning if one did, as I would find it useful myself. --wpd On Sun, Mar 2, 2008 at 2:20 PM, Chris Richards <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > When the user clicks a link, i want to merge the current customers > details into a word document (*.doc) and return it to the user as a > download. > > Does anybody have any ideas on what the best way to do it is? > > I''m racking my brains trying to think of the best way to do this. > > My ideal scenario : > > 1. User searches for customer > 2. User selects which type of document to open, e.g. Reminder Letter 3 > 3. Browser sends the user a doc file, with the customers details already > in the address part, ready for editing/printing. > > ANy ideas welcome > > Thanks > > Chris > -- > 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg (Radar)
2008-Mar-03 03:25 UTC
Re: Performing a mail merge using rails and ? any ideas?
There''s PDF::Writer for Ruby. http://ruby-pdf.rubyforge.org/pdf-writer/ On Mon, Mar 3, 2008 at 11:27 AM, Patrick Doyle <wpdster-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > This probably doesn''t help much, but would a PDF document be > acceptable instead of a Word document? I recall reading about a > package that produces PDFs from within PHP scripts.... here''s the ref > from the book: http://sourceforge.net/projects/pdf-php/. I have no > idea if such a beast exists for RoR (having a grand total of about 5 > days of experience in the field myself), but I would be interested in > learning if one did, as I would find it useful myself. > > --wpd > > > On Sun, Mar 2, 2008 at 2:20 PM, Chris Richards > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > When the user clicks a link, i want to merge the current customers > > details into a word document (*.doc) and return it to the user as a > > download. > > > > Does anybody have any ideas on what the best way to do it is? > > > > I''m racking my brains trying to think of the best way to do this. > > > > My ideal scenario : > > > > 1. User searches for customer > > 2. User selects which type of document to open, e.g. Reminder Letter 3 > > 3. Browser sends the user a doc file, with the customers details > already > > in the address part, ready for editing/printing. > > > > ANy ideas welcome > > > > Thanks > > > > Chris > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jodi Showers
2008-Mar-03 03:37 UTC
Re: Performing a mail merge using rails and ? any ideas?
Chris - ( On 2-Mar-08, at 10:25 PM, Ryan Bigg (Radar) wrote:> There''s PDF::Writer for Ruby. > > http://ruby-pdf.rubyforge.org/pdf-writer/ > > On Mon, Mar 3, 2008 at 11:27 AM, Patrick Doyle <wpdster-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > This probably doesn''t help much, but would a PDF document be > acceptable instead of a Word document? I recall reading about a > package that produces PDFs from within PHP scripts.... here''s the ref > from the book: http://sourceforge.net/projects/pdf-php/. I have no > idea if such a beast exists for RoR (having a grand total of about 5 > days of experience in the field myself), but I would be interested in > learning if one did, as I would find it useful myself. > > --wpd > > > On Sun, Mar 2, 2008 at 2:20 PM, Chris Richards > <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > When the user clicks a link, i want to merge the current customers > > details into a word document (*.doc) and return it to the user as a > > download. > > > > Does anybody have any ideas on what the best way to do it is? > > > > I''m racking my brains trying to think of the best way to do this. > > > > My ideal scenario : > > > > 1. User searches for customer > > 2. User selects which type of document to open, e.g. Reminder > Letter 3 > > 3. Browser sends the user a doc file, with the customers details > already > > in the address part, ready for editing/printing. > > > > ANy ideas welcome > > > > Thanks > > > > Chris > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > >I missed the original post - so hopefully I''m answering the right question. I''ve done this exact thing before - 1, create a word template setting bookmarks. 2. Use the ruby OLE (activex) library to control word, iterating over the bookmarks, placing data in the new word doc from the database. 3. Then save the file, and sendfile it back to the users browser. That''s the rough outline - you should be able to google for code samples. If you get really stuck let me know - I''m really busy - but can likely help out. cheers, Jodi --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---