【问题标题】:Pandoc docx to HTML include height and width on <img> tagPandoc docx 到 HTML 包括 <img> 标签的高度和宽度
【发布时间】:2016-02-19 19:34:16
【问题描述】:

我正在使用 Pandoc 将 Microsoft .docx 文件转换为 HTML。当前使用--extract-media 选项会生成&lt;img&gt; 形式的&lt;img src='pandoc.image.png'&gt; 标记,但它不会将图像的heightwidth 属性添加到&lt;img&gt; 标记。 如何让 pandoc 将图像的高度和宽度属性作为属性添加到 &lt;img&gt; 标记?

我只能使用命令行进行转换,没有脚本。我正在运行的命令是pandoc --from docx --to html input.docx --extract-media=/tmp/pandoc

【问题讨论】:

  • 也许问那个库的创建者?

标签: html docx pandoc


【解决方案1】:

不幸的是,Pandoc 在其内部 AST 中 doesn't support image sizes。所以这目前是不可能的。但是,一旦 Docx Reader 也进行了调整,这将起作用。

【讨论】:

    猜你喜欢
    • 2015-04-07
    • 1970-01-01
    • 1970-01-01
    • 2015-01-01
    • 1970-01-01
    • 2016-04-15
    • 2021-07-11
    • 1970-01-01
    • 2013-07-30
    相关资源
    最近更新 更多