I amd using pandoc to convert a standalone html (with not external dependency), with all required css and js merged in html itself. HTML has few svg graphs generated via javascript library
The said html file, when opened in browser renders fine, but when converted to docx, svg images are missing from docx file.
command used to convert, looks like
pandoc ./something.html -s -o test1.docx
What I suspect is that it is converting file before javascript could even render those images.
Appreciate help
Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx.
You can use the program pandoc on the SCF Linux and Mac machines (via the terminal window) to convert from formats such as HTML, LaTeX and Markdown to formats such as HTML, LaTeX, Word, OpenOffice, and PDF, among others.
The docx needs a png fallback image, that it uses to show the image.
Pandoc doesn't create those fallback images, but they are aware of the issue. You can track the progress here:
https://github.com/jgm/pandoc/issues/4058
It should be included in the next release.
It is now implemented in 2.15
https://github.com/jgm/pandoc/releases/tag/2.15
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With