I guess you might write a filter which dives into the media bag to get the wmf images, calls a command line conversion program through a pipe, either with writing to/reading from intermediate image files or piping the image data directly, then puts the svg images into the media bag and adjusts the src attribute of the image element appropriately. I'm afraid I can't help you with the details, not even what conversion program to use, as I never have done that particular conversion, nor touched the media bag. You can read about the media bag here:

https://pandoc.org/lua-filters.html#module-pandoc.mediabag

about the pandoc lua module's pipe function here:

https://pandoc.org/lua-filters.html#pandoc.pipe

and about Lua's piping mechanism here:

https://www.lua.org/manual/5.3/manual.html#pdf-io.popen

and about Lua's mechanism for executing external commands here:

https://www.lua.org/manual/5.3/manual.html#pdf-os.execute

Den fre 11 mars 2022 19:08Øyvind Harboe <oyvindharboe@gmail.com> skrev:
Is there a way to  convert a .docx with embedded WMF files to .docx with embedded SVG files using pandoc?

The reason is that it would increase interoperability of the .docx files when uploading to Google Docs. WMF files don't work reliably on with Google Docs. Text embedded in the WMF file won't appear after uploading the .docx file.

Sincerely,

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhDSkDcFtzUG_K%2BD26ozGf5sMjzjXDJ4NPJq-_Ku8Cugqw%40mail.gmail.com.