jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.51k stars 3.37k forks source link

docx reader: drawing canvas not supported #2792

Open rockyallen opened 8 years ago

rockyallen commented 8 years ago

Saved as strict docx. pandoc 1.16.0.2, Windows 7, MS Word 2013. Command:

pandoc -f docx -t asciidoc --normalize --wrap=none --atx-headers canvas.docx

Output:

A drawing canvas

Canvas is entirely ignored. --extract-media also ignores the canvas. Ideally it would create a single image from the whole canvas, or treat the individual elements as separate images.

canvas.docx

jkr commented 8 years ago

Canvas actually draws it, right? It doesn't just embed an image? I'll investigate it further, but it doesn't look like something we'll be able to deal with anytime soon.

rockyallen commented 8 years ago

Not sure about the technical details, but a canvas is an invisible rectangular container that you can add graphics and text to, so that they move around a a group.

jkr commented 8 years ago

Well, it looks like there are two sepate issues here:

  1. pandoc can't handle shapes, like the dodecahedron, which word actually draws from vector data. There could conceivably by a way to convert them in the future, but that's a different discussion entirely.
  2. we should be able to handle images within canvases. Can you post an example with two pics (like the yellow warning sign) in a canvas? That will make it easier to focus on what we should be able to do.

Thanks for your help on this, Jesse

rockyallen notifications@github.com writes:

Not sure about the technical details, but a canvas is an invisible rectangular container that you can add graphics and text to, so that they move around a a group.


You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/jgm/pandoc/issues/2792#issuecomment-197528820

rockyallen commented 8 years ago

canvas-2-images.docx

jkr commented 8 years ago

Thanks. The issue as a whole isn't solved yet, but I've made some progress. With commit 28c7617f19c4d6dd69e2aa9c904af13e11e4e639, we can now output one image properly. Multiple images grouped with canvas are still a work in progress.