public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Converting .docx with embedded WMF files to .docx with SVG files
@ 2022-03-11 18:07 Øyvind Harboe
       [not found] ` <e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Øyvind Harboe @ 2022-03-11 18:07 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 764 bytes --]

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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1098 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Converting .docx with embedded WMF files to .docx with SVG files
       [not found] ` <e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2022-03-12 10:54   ` BPJ
       [not found]     ` <CADAJKhDSkDcFtzUG_K+D26ozGf5sMjzjXDJ4NPJq-_Ku8Cugqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: BPJ @ 2022-03-12 10:54 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2452 bytes --]

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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.

[-- Attachment #2: Type: text/html, Size: 3824 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Converting .docx with embedded WMF files to .docx with SVG files
       [not found]     ` <CADAJKhDSkDcFtzUG_K+D26ozGf5sMjzjXDJ4NPJq-_Ku8Cugqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-03-12 10:59       ` BPJ
  0 siblings, 0 replies; 3+ messages in thread
From: BPJ @ 2022-03-12 10:59 UTC (permalink / raw)
  To: pandoc-discuss

[-- Attachment #1: Type: text/plain, Size: 2758 bytes --]

Maybe this is useful for suggestions of conversion tools to use:

https://stackoverflow.com/questions/7035588/how-to-convert-wmf-files-to-svg-files

Den lör 12 mars 2022 11:54BPJ <melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev:

> 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-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/pandoc-discuss/e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n%40googlegroups.com
>> <https://groups.google.com/d/msgid/pandoc-discuss/e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAUcu5VFK7jLfGGV7PNoJz9L7Fp67mJvuzPWyaoQXkvSQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 4686 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-12 10:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-11 18:07 Converting .docx with embedded WMF files to .docx with SVG files Øyvind Harboe
     [not found] ` <e5b7f51f-ee8f-4a9d-8660-0a01b1e52192n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-03-12 10:54   ` BPJ
     [not found]     ` <CADAJKhDSkDcFtzUG_K+D26ozGf5sMjzjXDJ4NPJq-_Ku8Cugqw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-03-12 10:59       ` BPJ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).