I am trying to convert my HTML file to docx using pypandoc library of python. But while converting HTML file to docx the numbered list is not preserving in docx file.
Numbered List in HTML File:
Numbered List in docx file:
Here is my code:
import pypandoc
pypandoc.convert('Outline.html', 'docx', outputfile='Outline.docx')
Also tried using:
pypandoc.convert_file('Outline.html', 'docx', outputfile='Outline.docx')
I am using the following environment:
pypandoc 1.4 # Installed using pip
pandoc 1.12.2.1
OS : Ubuntu 14.04
Python Version : Python 2.7
I tried using following versions of libraries also:
pypandoc 1.3
pandoc 2.0
pandoc 2.4
pandoc 2.5
Please refer the attached files for more clarification:
HTML file : Outline.html
Generated Docx file : Outline.docx
Does anyone have any suggestions for converting HTML file to docx file with numbered list preserved using pypandoc ?
Thank you.