I recently authored a blog post, including Ruby sample code, to
demonstrate how to convert to and from common file formats (including
DOC and PDF) using a third party product.

For details see this post:
http://blog.muhimbi.com/2013/03/use-ruby-on-rails-to-convert-merge-and.html

Massive disclaimer! I worked on this product so I am obviously biased.

-- 
Posted via http://www.ruby-forum.com/.