unrtf – rtf to html conversion utility

For http://FreeTamilEbooks.com project, we have to convert many Word Documents into html before converting them to epub using http://PressBooks.com

I used LibreOffice to open Word doc and to save as HTML.

Till LibreOffice 4.1, the images are extracted and stored separately along with HTML file.

But, after LibreOffice 4.2, they moved to base64 type of encoding of images, so that images are embedded into HTML files. We can not separate images from HTML files.

This was so annoying and many people are reporting this as a bug here.
https://bugs.documentfoundation.org/show_bug.cgi?id=48887

But, This seems not to be fixed.

So, I installed LibreOffice 4.1 in /opt just to use the old feature of storing images separately.

Just now, found another utility, unrtf to do the same.

http://www.gnu.org/software/unrtf/

To install it in ubuntu/debian

sudo apt-get install unrtf

If you get an word doc with images, save it as a Rich Text File using libreoffice writer.

example:

test.doc -> test.rtf

Then,

unrtf test.rtf > test.html

This gives a nice HTML file and images separately.

Thanks for the GNU team for the nice utility.

I can get rid of old LibreOffice 4.1 now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s