views:

204

answers:

1
  • Testing on both Debian and Mac OSX
  • On Debian, openoffice.org-writer package is installed
  • Using latest OpenOffice.org version: 3.2.1
  • Tried both unoconv and JODConverter

I start by launching a headless OpenOffice instance:

soffice -headless -nofirststartwizard -accept="socket,host=localhost,port=8100;urp;"

I'm in the right directory with a valid docx file:

mini:jodconverter-2.2.2 username$ ls | grep docx
x.docx

When I open x.docx manually in openoffice, then save it as HTML, it works fine.

However, when I try converting it to html through either unoconv or JODConvert (both make use of OpenOffice UNO), they both throw the following exception:

(Exception) URL seems to be an unsupported one

Additionally, OpenOffice crashes and delivers a crash report and here's a manual backtrace in gdb after it has crashed: clickme.

The funny thing is that it works fine using a simple OpenOffice macro, but I need be able to do these conversions through UNO. And as far as I know, you can't execute macros that way.

Sample commands:

mini:jodconverter-2.2.2 username$ java -jar lib/jodconverter-cli-2.2.2.jar -f html x.docx
username@debian$ unoconv -f html x.docx

I can only conclude that this must be a bug in OpenOffice, but I am unable to find the exact cause and it appears that I am one of very few that are affected.

Anyone have any clue?

edit:

It appears including images in my docx file is a major factor in this.

A: 

You also need openoffice.org-headless and openoffice.org-xsltfilter installed ! But I doubt that is causing the problem in your case.

Dag Wieers