tags:

views:

239

answers:

3

I have an RTF file that I need to display to a user. I know that I need to convert it if I want to display it in the browser. I would like to be able to convert it to JPG so that I can take advantage of other code that I am using that uses ImageMagick to convert JPG to PDF. ImageMagick will convert a PDF to a JPG, but not an RTF :( I am using PHP on a windows box.

**Update**

I have figured out how to convert the RTF to PDF and then I use ImageMagick to convert it to JPG for display. I don't like the fact that I have to go to PDF first, but it works so I am going to stick with it. Thanks to all that have responded.

+1  A: 

Perhaps you could convert the RTF to PDF then to JPG. Sure thats more work than going straight from RTF to JPG but it might be an acceptable short term workaround for today.

Brian Ensink
A: 

This might require more that one tool.....

for the rtf to pdf

http://www.linuxquestions.org/questions/linux-software-2/convert-rtf-to-pdf-263247/ http://www.linuxforums.org/forum/linux-applications/141953-looking-convert-rtf-pdf-utility.html

As for the PDF to JPG you can try convert(linux)...ImageMagick

Ronald Conco
A: 

You might want to consider converting your RTFs to HTML, instead of turning them into images.

This looks promising.

Blorgbeard