相关疑难解决方法(0)

pandoc将带样式表的html转换为docx

我一直在敲打这个问题几个小时,我确信解决方案很简单,或者根本不存在.

我正在尝试将html文件转换为docx!

<!DOCTYPE html>
<html>
<head>
<style>
body {
    background-color: #d0e4fe;
}

h1 {
    color: orange;
    text-align: center;
}

p {
    font-family: "Times New Roman";
    font-size: 20px;
}
</style>
</head>
<body>

<h1>My First CSS Example</h1>
<p>This is a paragraph.</p>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

我可以转换它没有问题,但我不能让风格坚持下去.

pandoc -s myfile.html -o test64.docx
pandoc -s -c myfile.css myfile.html -o test64.docx
Run Code Online (Sandbox Code Playgroud)

请救救我

html converter docx pandoc

11
推荐指数
2
解决办法
5213
查看次数

标签 统计

converter ×1

docx ×1

html ×1

pandoc ×1