Ask Your Question

Converting files using soffice convert-to with embedded images (html to doc) [closed]

asked 2013-07-11 21:31:10 +0200

Ranieri Mazili gravatar image

updated 2013-07-12 21:24:54 +0200

manj_k gravatar image


I'm converting html files to doc using the following command:

soffice -headless -convert-to doc test.html

...and it works well, but if my html has an embedded image like this page: ( just doesn't work... it creates the doc file, but the image is not added to the doc document.

Anyone knows if I need to add a parameters to make it work or if it's not possible to work with html embedded images?

I really appreciate any help

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-03 22:08:47.474026

2 Answers

Sort by » oldest newest most voted

answered 2013-07-12 14:29:37 +0200

Ranieri Mazili gravatar image

The bug was reported, if you want to check the status, go to:

edit flag offensive delete link more



answered 2013-07-12 09:39:41 +0200

oweng gravatar image

updated 2013-07-12 09:54:42 +0200

This appears to be a bug. When you state "embedded" I presume you mean using inline Base64 encoding e.g.,

<img src="data:image/jpeg;base64, ... " id="idImagem" border="0">

It is also worth noting that you really should be specifying a particular DOC format to output e.g.,

--convert-to doc:"MS Word 97"            # produces a dot graphic
--convert-to doc:"MS Word 2003 XML"      # measure_conversion.xsl: Find no conversion for  to 'twip'!
--convert-to doc:"MS Word 2007 XML"      # produces a graphic with a "read-error"
--convert-to docx:"Office Open XML Text" # produces a graphic with a "read-error"

The two "read-error" outputs appear like this when opened in Writer:


The DOCX version certainly appears to include the Base64 encoded object so I am not sure why it experiences a read-error. I can't find a related open bug report for this issue so please raise a bug. Include as much detail as you can and link to this thread if necessary. Post the number of any raised bug back here in a comment using the format "fdo#123456" (this format appears broken at present, but hopefully will be fixed soon).


edit flag offensive delete link more

Question Tools



Asked: 2013-07-11 21:31:10 +0200

Seen: 10,195 times

Last updated: Jul 12 '13