# Converting Word Documents (and other types of files) to PDF

**URL:** <https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286>\
**Category:** Rails\
**Created:** [February 12, 2007, 11:04am UTC](https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286 "2007-02-12T11:04:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brendon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@brendon](https://www.ruby-forum.com/u/brendon)\
**Post date:** [February 12, 2007, 11:04am UTC](https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286/1 "2007-02-12T11:04:39Z")

</div>

Hi everyone,

I’m currently developing a Rails content management system, and one of  
the useful features we’re trying to get sorted is a way to allow a  
user to upload a word document or some other type of regular file, and  
have it converted by the server to PDF.

I’ve seen a java programme called Alfresco do this using Open Office,  
but I’m just wondering if there’s another way that’s more integrated  
with Ruby?

If anyone knows if bits and pieces of tech already exist in this area  
but they just haven’t been brought together in this way yet, I’d be  
keen to learn the names of these projects. Perhaps we can create a  
plugin as a result of our larger project.

Looking forward to your ideas 🙂

Cheers,

Brendon

---

<div class="post-metadata">

**Author:** ![brendon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@brendon](https://www.ruby-forum.com/u/brendon)\
**Post date:** [February 12, 2007, 11:35am UTC](https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286/2 "2007-02-12T11:35:43Z")

</div>

Hi,

[http://www.xml.com/pub/a/2006/01/11/from-microsoft-to-openoffice.html](http://www.xml.com/pub/a/2006/01/11/from-microsoft-to-openoffice.html)

Explain how use Ooo in batch mode with a macro to silently convert  
office documents in ODF or PDF.

This method is callable by Rails, but took much time. Better to code a  
local service dedicated to this task.

> I’m currently developing a Rails content management system, and one of  
> the useful features we’re trying to get sorted is a way to allow a  
> user to upload a word document or some other type of regular file, and  
> have it converted by the server to PDF.

---

<div class="post-metadata">

**Author:** ![brendon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@brendon](https://www.ruby-forum.com/u/brendon)\
**Post date:** [February 12, 2007, 11:41am UTC](https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286/3 "2007-02-12T11:41:43Z")

</div>

Hi, you might want to try the following:

[http://raa.ruby-lang.org/project/doc\_convert/](http://raa.ruby-lang.org/project/doc_convert/)

Also, I would highly recommend posting to comp.lang.ruby

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![brendon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@brendon](https://www.ruby-forum.com/u/brendon)\
**Post date:** [February 12, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286/4 "2007-02-12T20:16:54Z")

</div>

Thank you both for this information. It’s very useful, and yes, I’ll  
try posting this in the Ruby group 🙂 Thanks for the advice.

Cheers,

Brendon

---

<div class="post-metadata">

**Author:** ![brendon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/5f9b8f/32.png) [@brendon](https://www.ruby-forum.com/u/brendon)\
**Post date:** [January 15, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/converting-word-documents-and-other-types-of-files-to-pdf/85286/5 "2009-01-15T14:23:50Z")

</div>

This can help: [http://www.dancrintea.ro/html-to-pdf/](http://www.dancrintea.ro/html-to-pdf/)  
middle page, see HTML to PDF with Java:

You can use [OpenOffice.org](http://OpenOffice.org), running as a server and command it remotely  
for document convertion.

Besides HTML to PDF, there are also possible other convertions:  
doc → pdf, html, txt, rtf  
xls → pdf, html, csv  
ppt → pdf, swf

Brendon wrote:

> Thank you both for this information. It’s very useful, and yes, I’ll  
> try posting this in the Ruby group 🙂 Thanks for the advice.
> 
> Cheers,
> 
> Brendon
