Epub (ebook) from LibreOffice - Part 2

[March 28, 2013]

This page will document lessons I have learned with respect to using LibreOffice Writer to prepare a document for conversion to ePub. While these lessons are not not necessarily specific to the use of the Writer2ePub extension, I should note that I am using this extension to help teach myself about ePub, so it may be that these lessons are not applicable to ePub in general. However, I will not anything specific to Writer2ePub that I am aware of.

Layout Considerations

The first and most basic lesson is that the layout of ePub books is intended to be dynamic:

"The design center of EPUB is dynamic layout: content is typically intended to be formatted on the fly rather than being typeset in a paginated manner in advance (i.e., expecting a particular sized "page"). This core capability is useful, for example, for optimizing rendering onto different sized device screens or window sizes, and it facilitates and simplifies content accessibility. While it is possible to incorporate more highly formatted content in EPUB — for example via bitmap images or SVG graphics, or even use of CSS explicit positioning and/or table elements to achieve particular visual layouts — Authors are strongly discouraged from utilizing such techniques. They are not reliable in EPUB since many Reading Systems render content in a paginated manner rather than creating a single scrolling Viewport and since each Reading System may define its own pagination algorithm." (quoted from EPUB 3 Overview)

Images

Here are the image formats supported by EPUB 2:

  • GIF
  • PNG (non-transparent)
  • JPG (quality factor 40 or higher)
  • SVG

Other considerations

  • 300 dpi resolution is recommended
  • Use color images (current devices may not support color, but future devices will)
  • Use JPG for photographs
  • Use GIF for line art and text

In reviewing supported formats for e-readers generally, there does not appear to be much support for SVG - it is probably better to avoid SVG at this time, in the interest of making an epub document portable across the various e-readers.

Cover images: Amazon makes this recommendation in its own guidelines: "Kindle books must have a marketing cover image provided for use on the website detail page. The preferred format for the cover is a JPEG

image of 2500 pixels on the longest side (with a minimum of 1000 pixels on the longest side).

Image Captions

A very common concern with ePub files containing images is the problem of keeping image captions and images from being split across separate pages. Thre are a variety of ways to do this - none of them ideal.

One simple method is to include the text as part of the image. The disadvantage of this method is that text is not longer dynamic, and will not reflow or re-size along with other text. Also, if the image is re-sized by the e-reader, it my no longer be clear.