Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dan-mckay
Last active February 15, 2017 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dan-mckay/3985dd239df7ad90f3ec8cbfbbf83b1d to your computer and use it in GitHub Desktop.
Save dan-mckay/3985dd239df7ad90f3ec8cbfbbf83b1d to your computer and use it in GitHub Desktop.
Notes on what we should parse from fixed layout epub

Fixed Layout Epubs

The rendition:layout property

  • pre-paginated
  • reflowable default

Book - <meta property="rendition:layout">pre-paginated</meta>

Spine - <itemref id="titlepage" properties="rendition:layout-pre-paginated"/>

The rendition:orientation property

  • landscape
  • portrait
  • auto default

Book - meta property="rendition:orientation">landscape</meta>

Spine - <itemref id="titlepage" properties="rendition:orientation-landscape"/>

The rendition:spread property

  • none: never implement synthetic spread
  • landscape: implement only when device is in landscape
  • portrait: implement only when device is in portrait
  • both: implement when device is in portrait or landscape
  • auto default - none specified. The reader decides how it should render the content

Book - <meta property="rendition:spread">none</meta>

Spine - <itemref id="titlepage" properties="rendition:spread-landscape"/>

The page-spread-* properties

  • page-spread-center: Render as a single page and align in the center of the reader's content area
  • page-spread-left: Render as the left hand page of two adjacent pages
  • page-spread-right: Render as the right hand page of two adjacent pages

Spine only - <itemref id="center-plate" properties="rendition:page-spread-center"/>

NB: These properties apply to both pre-paginated and reflowable content, and they only apply when the reader is creating synthetic spreads.

page-progression-direction
  • ltr: left to right
  • rtl: right to left
  • default: no preference, the reader decides which

This value is set as an attribute on the spine element in the OPF file, like so:

<spine page-progression-direction="ltr">
    <itemref idref="intro"/>
    ...
</spine>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment