Skip to content
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

Inline "thumb" images lost in ODF export #48

Open
hungerburg opened this issue Jul 26, 2014 · 3 comments
Open

Inline "thumb" images lost in ODF export #48

hungerburg opened this issue Jul 26, 2014 · 3 comments

Comments

@hungerburg
Copy link

When exporting to odf, inline "thumb" images are missing in the resulting file. The situation is a little tricky, because with the pediapress renderer, if immediately ODF is requested, images may not be fetched at all, so:

  • Save Collection as Book
  • From the Books page download the PDF first (which has thumb images)
  • From the Books page download the ODF (images get in from the cache)

The resulting ODF has a Pictures sub-folder with all the images inside, yet they are not displayed in Writer.

  • unzip the downloaded ODF, prettify content.xml (eg. xmllint -format)
  • in content.xml move any "draw:frame…" nodes below (hierarchically spoken) the next "text:p…" node
  • zip the directory to "newfile.odf"

The new file shows the inline images perfectly!

http://odf-validator.rhcloud.com/ does not find any errors in content.xml. Here's to the specification http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#element-draw_frame Should be OK as is, but lo!

@ckepper
Copy link
Contributor

ckepper commented Jul 30, 2014

Hi hungerburg,

work on ODF has stopped a long time ago. But patches are always welcome :-) Thanks for your input.

Best,
Christoph

@hungerburg
Copy link
Author

I rather not run my own renderer. No patches, at least not soon. Looking at the source, https://github.com/pediapress/mwlib/blob/master/mwlib/odfwriter.py#L291 the toolkit seems to support the necessary shenanigans in very few lines. This should apply to "frames" as well: of course, one would have to make the move a loop, there may be several images outside of the next paragraph. Still I preferred if pediapress did in-line images in odf…

@rastaferraille
Copy link

Hello,

"work on ODF has stopped a long time ago. "
Why has it been stopped ?
Is there a hope that it could work in the future with ODF and thumb images ?
I'm very insterrested with making it work as I need to export my wiki content and then modify it. Maybe there is other formats I should use instead of ODF ?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants