Obsidian Pandoc plugin—Pandoc export failed

What I’m trying to do

Hello, everyone! I’m using the Pandoc plugin for Obsidian on the Mac, attempting to export a Markdown document to DOCX format. It works great when I’m exporting a document that only contains text, but it fails when I’m exporting a document containing text and embedded images. Here is the error message I see:


Things I have tried

Exporting without the images works fine. It’s just when I transclude images in an Obsidian document that I get the error message. I’ve tried updating to the latest version of Pandoc and that does not help.

1 Like

\8212 is an em dash. Not sure why it’s having trouble with that, but try to changing the file name so it doesn’t include an em dash (assuming that it does).

1 Like

The file name does not have an em dash. The document itself has many em dashes. However, the em dash is not in the PNG file (of course), and that appears to be what the error message is pointing to.

Thank you for the suggestion, however!

Okay, I see. Can you share more details about the export (extra arguments etc.).

I’m on a Mac running Sonoma, but I’m pretty sure this was a problem on the previous OS as well.

Default Pandoc install, no modifications.

Here are my plugin settings:

I see you are using HTML as the source, is that by choice? Do you have the same issue if you use markdown as the source?

If this doesn’t do the trick, perhaps try switching to the Enhancing export plugin, which is a better maintained plugin for Pandoc integration. The Pandoc plugin is buggy, since it is not being maintained.

It would also be useful to do a conversion using Pandoc directly from the terminal. This would rule out interference from plugins.

The basic command would be something like:
pandoc input_filename.md -f markdown -t docx --resource-path="/users/path/to/attachment/folder/in/vault/" -o output_filename.html

BTW, are you embedding the images with wikilinks (Obsidian default link format) or markdown links: [Image name](image_path.png)?

I think this works!

  • I switched to the Enhancing Export plugin.
  • I also needed to use the Install Link Converter plugin.

And I was able to export a complex test document with embedded images.

Highlighting by ==surrounding text with equal signs== did not carry over to the DOCX file, but I can live with that.

I’m going to say this is almost certainly fixed. If I run into any problems, I’ll be back.

Thanks so much!

Follow-up for the benefit of those Googling this solution: The reason I used the Link Converter plugin is because I needed to convert my Obsidian-style image links to Markdown-style. Otherwise, the image does not appear in the resulting DOCX document.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.