【问题标题】:Converting DOCX to Markdown fails to place image将 DOCX 转换为 Markdown 无法放置图像
【发布时间】:2019-08-30 15:56:08
【问题描述】:

我正在尝试使用 Mammoth 将带有图像的 DOCX 文件转换为 Markdown 格式:

mammoth git.docx --output-format=markdown > git.md

当我将git.md 推送到github 并检查它时。它没有显示图像

当我在文本编辑器中打开 git.md 时,以下内容用于图像

![](data:image/png;base64,jasdkjh)

【问题讨论】:

    标签: markdown mammoth


    【解决方案1】:

    我怀疑 GitHub 不喜欢内联的图像数据。尝试提供--output-dir

    默认情况下,图像包含在输出 HTML 中。如果--output-dir 指定了输出目录,则将图像写入单独的文件。例如:

    mammoth document.docx --output-dir=output-dir
    

    如果存在,将覆盖现有文件。

    【讨论】:

    • 我试试看
    猜你喜欢
    • 2014-10-08
    • 2020-05-22
    • 1970-01-01
    • 2014-05-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多