18

I want to convert an HTML file containing base64 encoded images to DOCX. When I do this using pandoc the base64 images are not converted.

Is it possible to include the base64 images using pandoc?

Mark Heckmann
  • 10,943
  • 4
  • 56
  • 88

2 Answers2

22

See https://pandoc.org/MANUAL.html#option--self-contained

pandoc --self-contained --metadata pagetitle="title" index.md -o index-out.html

This feature was unavailable due to a bug, but has been fixed since May, 2014.

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
John MacFarlane
  • 8,511
  • 39
  • 33
  • It also works when going from Markdown to HTML. All references to images will be base64-encoded. – Mig82 Mar 12 '21 at 19:57
7

With last version, use

pandoc --standalone --embed-resources --metadata pagetitle="title" index.md -o index-out.html
jlSta
  • 294
  • 3
  • 12