headings are numbered when converting docx to html

asked 2019-01-17 12:19:59 +0100

yasko gravatar image

updated 2019-01-17 13:46:33 +0100

I'm working on a service for converting documents to html.

The command I'm using is libreoffice --convert-to html document.docx. The test document is very simple - a heading and some normal text below it.

The problem is that in the converted file the heading is placed inside an ordered list, which results in number being placed in front of the heading. I tried this with versions 6.1 and 5.1 and the results is the same.

Also tried File > Export from the gui and the result did not have the number in front of the heading, but when I tried File > Preview in Web Browser - the result was the same as using --convert-to.

So, is there a way to achieve the same results using --convert-to as File > Export?

edit retag flag offensive close merge delete

Comments

Html or xhtml? You may have more luck with the latter. But honestly, converting from one foreign format to another foreign format is dangerous.

floris v gravatar imagefloris v ( 2019-01-17 12:33:35 +0100 )edit

it's html (see the command), but the same thing happens with xhtml - I didn't get the dangerous part tho

yasko gravatar imageyasko ( 2019-01-17 12:46:29 +0100 )edit