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.
\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).
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.
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)?
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.