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 :
- User searches for customer
- User selects which type of document to open, e.g. Reminder Letter 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
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: PHP Pdf creation - R&OS download | SourceForge.net. 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 R.
There’s PDF::Writer for Ruby.
http://ruby-pdf.rubyforge.org/pdf-writer/
On Mon, Mar 3, 2008 at 11:27 AM, Patrick D. [email protected]
wrote:
I’m racking my brains trying to think of the best way to do this.
–
Ryan B.
Feel free to add me to MSN and/or GTalk as this email.
Chris - (
On 2-Mar-08, at 10:25 PM, Ryan B. (Radar) wrote:
from the book: PHP Pdf creation - R&OS download | SourceForge.net. I have no
When the user clicks a link, i want to merge the current customers
2. User selects which type of document to open, e.g. Reminder
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.
-
Use the ruby OLE (activex) library to control word, iterating over
the bookmarks, placing data in the new word doc from the database.
-
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