pandoc convert html with style sheet to docx

后端 未结 2 1034
北荒
北荒 2021-02-08 08:16

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!

<
相关标签:
2条回答
  • 2021-02-08 08:44

    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"

    0 讨论(0)
  • 2021-02-08 08:46

    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

    0 讨论(0)
提交回复
热议问题