-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pandoc creates ODT files which libreoffice cannot open when including 2 images #1069
Comments
Issue still exists in current git HEAD 1.12.1-41-ge1a9a61 (e1a9a61) |
The relevant part of the content.xml within the ODT file looks like (pretty-printed):
libreoffice no longer complains if you add
works whereas
doesn't. |
…open libreoffice was unable to open odt files produced by pandoc if they contained more than 1 image. e.g. the markdown: ![](img1.svg) ![](img1.svg) Passed through pandoc to create an ODT causes libreoffice (4.1.3.2) to produce the an error in a dialog box reading: > Read-Error. > Error reading file Libreoffice doesn't seem to like the values of the `draw:name` attributes to appear more than once on different `draw:frame` XML elements. I suspect if the `draw:name` attribute is missing libreoffice internally defaults to some fixed value causing a conflict if more than one image is present in the document. It seems like this technically a libreoffice bug, but it is important for pandoc to produce ODT files which libreoffice can read given that it and its cousin openoffice are likely to be the most common programs to be used to open ODTs so this commit works around this issue in pandoc. This commit is probably more useful as a guide as to where the code to be fixed should be fixed rather than something that can be applied directly to master. It is intended as a discussion point. I do not know Haskell and have not written any before. Also a test case is missing. Fixes jgm#1069
Commit e7618ff fixes it for me but is probably not production ready but may be useful as an illustration of the problem. |
Pandoc version 1.11.1
libreoffice 4.1.3.2
on Debian testing (jessie)
libreoffice is unable to open odt files produced by pandoc if they contain more than 1 image.
Test case:
libreoffice opens and presents a dialog box reading:
The issue disappears if the image included only once.
The issue is still present when:
I have not yet tested with Pandoc 1.12.1 as I am having difficulty building it.
I do not know if this is technically a libreoffice or a pandoc issue, either way I think it's important that pandoc produces ODTs that libreoffice can open as that is what the majority of people will be using to open the ODTs.
The text was updated successfully, but these errors were encountered: