Fwd: Generate MS Word files in Rails

On Wed, Mar 25, 2015 at 7:32 PM, Scott R.
[email protected]
wrote:

  1. You might want to use RTF templates instead. It’s a format you can more
    easily search for your markers and modify, and Word will open it directly.

​Thanks for your answer Scott.

Does RTF pose any formatting challenges as compared to docx? Except
bold,
italics, bulleting my requirement doesn’t need any advanced formatting.

I just need users to be able to download the file, open it in MS Word
and
print.

Thanks,
Ganesh

On 26 March 2015 at 08:11, Ganesh Ranganathan
[email protected] wrote:

Does RTF pose any formatting challenges as compared to docx? Except bold,
italics, bulleting my requirement doesn’t need any advanced formatting.

I just need users to be able to download the file, open it in MS Word and
print.

If you just want to download, open and print then I recommend using
pdf. Several possibilities are available for this:
https://www.ruby-toolbox.com/categories/pdf_generation

Colin

On Thu, Mar 26, 2015 at 2:22 PM, Colin L. [email protected] wrote:

If you just want to download, open and print then I recommend using
pdf. Several possibilities are available for this:

​I looked at PDF too but the users might want to make minor changes to
the
layout. The site is for generating legal agreements so minor editing and
formatting changes might be required ​before taking print

Thanks,
Ganesh

On 26 March 2015 at 08:58, Ganesh Ranganathan
[email protected] wrote:

On Thu, Mar 26, 2015 at 2:22 PM, Colin L. [email protected] wrote:

If you just want to download, open and print then I recommend using
pdf. Several possibilities are available for this:

I looked at PDF too but the users might want to make minor changes to the
layout. The site is for generating legal agreements so minor editing and
formatting changes might be required before taking print

OK.
It does of course mean that the printed document may not be the same
as the one you generated, that is presumably not an issue in your
case.

Colin

Hi Ganesh,

I would also recommend you to take a look at RTF, but if like me the
.docx
was a requirement I would suggest you to take a look at the gem
https://github.com/nickfrandsen/htmltoword.

It’s still in its early stages and doesn’t support bulleted lists, but
it’s
pretty simple to use and have nice features like template definition and
page breaks.

Best regards,
Marco

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs