Skip to content Skip to sidebar Skip to footer

Pandoc Convert Html With Style Sheet To Docx

I've been banging my head on this one for a few hours, and I'm sure the solution is quite simple, or non-existent. I'm trying to convert an html file to docx!

Solution 1:

The above answer no longer works. According to the documentation, you now produce the template using:

pandoc --print-default-data-file reference.docx > custom-reference.docx

For the full documentation of how to use the template, go to the documentation and search for "--reference-doc"

Solution 2:

In your command the "-c myfile.css" would only be used if you were writing to HTML or HTML 5. It is a writer specific option.

For docx formatting you need to create a ".docx" template.

Start by running pandoc -D docx > my_template.docx and then edit the styles in my_template.docx.

Finally run pandoc -s myfile.html --template=my_template -o test64.docx

Post a Comment for "Pandoc Convert Html With Style Sheet To Docx"