Reputation: 171
I have tried using "freehep" for converting wmf to png. Since the result is really disappointing, I decide to try another solution. My program running under linux OS so imagemagick for converting is not working for me since the wmf/emf features is only supported under windows (not able to use wine as well). However, by using openoffice draw client, i can convert the wmf/emf to png perfectly. But how can I run the function from java? Is there a java api for openoffice draw?
Upvotes: 0
Views: 685
Reputation: 1983
From libreoffice's man:
OPTIONS
--accept=accept-string
Specify a UNO connect-string to create a UNO acceptor through which other programs can connect to access the API.
So open/libreoffice uses this approach to allow other programs and even client machines to run the program.
My suggestion: forget the complexity and run the following command from your program:
libreoffice --headless --convert-to png /path/to/file.wmfORemf
Here is a link to post describing how to run a command from Java
Upvotes: 2