Fixed layout ePub

From MobileRead
Jump to: navigation, search

Fixed layout is no longer the purview of PDF, CBR/CBZ, or DjVu. It is now available in some versions of ePub.

Contents

[edit] Overview

Fixed layout ePub is available from several companies. They are derived from the ePub specification with special restrictions and requirements. These include:

The basic idea is to offer books where the layout is as important part of the communication as the content. These include but are not limited to eTextbooks and children's eBooks.

[edit] Apple's version

[edit] Overview

In late December, 2010, Apple released iBooks 1.2 which supports this new kind of ePub. They also announced the publication of fixed layout books. These are perfect for cookbooks, travel books, photography books, and particularly childrens’ books and some textbooks. The fixed layout format is peculiar to Apple’s iOS 4 and 5, that is iPad, iPhone, and iTouch, but doesn’t work properly in other ePub compatible eBook readers.

A fixed layout book, sometimes called an “illustrated book”, has a pixel specific page size that you can use to precisely control the layout of the objects on the pages. You can embed fonts, choose particular text sizes, and precisely position images. You can even create a two-page spread in which a single image spans both pages. The iBooks app will scale the image to best fit the device.

These books can be zoomed but it is like zooming a picture. The text does not reflow and you will have to pan around to see the page. The books are primarily images with text overlays and in this fashion they resemble DJVU format (actually IW44) or some PDFs however they are peculiarly unique in that they begin as ePub style documents.

An ePub check program will typically issue some warnings about this extension to the spec, especially that items in the ePub file are not listed in the OPF. Standard ePub reading programs and devices may be able to read one of these files with good or poor results depending on the file itself.

[edit] The extension

The key component of the extension is the addition of the file META-INF/com.apple.ibooks.display-options.xml. This file tells iBooks that the book is the fixed-layout type, and typically looks something like this:

<?xml version="1.0" encoding="UTF-8"?>
<display_options>
  <platform name="*">
     <option name="fixed-layout">true</option>
  </platform>
</display_options>

There are a number of options here which are detailed in the iBookstore Asset Guide (v4.5), including how to define two-page spreads.

The XHTML files header will contain a required entry similar to:

<meta name="viewport" content="width=1000, height=1000"></meta>

This specifies the size of the fixed layout in pixels. Each file typically covers only one page. The CSS requires the entry:

body {width: 1000px; height: 1000px; }

Where the pixel sizes must be the same as the viewport meta entry. All font sizes and other information will usually use pixel dimensions.

[edit] For more information

[edit] Kobo Vox

Kobo Vox bases their fixed layout ePubs on the same format changes as Apple and support read aloud eBooks in this format.

[edit] Barnes and Noble version

[edit] DRP

DRP stands for Digital Replica Plus which means the document has both an image and text for each page to provide fixed layout or flowing layout options in their reader. Barnes and Noble uses a crude method of identifying their Fixed layout ePub to their reading application. The file name is modified to include _drp.epub as part of the name of the file. Their reader picks up this file name to provide the extra features.

DRP is essentially an ePub: it’s a zip file with the normal ePub structure, including an OPF with a manifest, spine, etc. In essence, a DRP contains two categories of items: images of pages rasterized from the incoming PDF, and the text (and images, if desired) of “articles” contained in the magazine (XHTML). There are a couple of ways in which a DRP deviates from the ePub standard:

  1. the format & reading system allow images to be top-level items in the spine, and
  2. the addition of a replica map (described in detail later), mapping page images to XHTML content (and vice versa).

“ArticleView™” presents the text of an article plus a headline, byline and one or more images in an HTML view. In our implementation, the article view “floats” above the page image, with some of the underlying page image visible along the sides of the article view.

[edit] Replica Map

A replicaMap.xml file begins with this markup:

<?xml version="1.0" encoding="UTF-8"?>
<ReplicaMap xmlns="http://www.bn.com/schemas/drp">
  <Title>Sound+Vision</Title>
  <Pages>
     <Page>...

Each Page element looks something like this (it’s generally pretty self-explanatory):

     <Page pageNum="16" file="images/pages/pg-17.jpg"
           thumbFile="images/pages/pg-17-thumb.jpg">
        <Group ePubTarget="article_16-1.xml">
           <Block coord="0.590507, 0.0396, 0.977047, 0.5536"/>
           <Block coord="0.332812, 0.9492, 0.972353, 0.9796"/>
        </Group>
     </Page>

There may be multiple “Group” elements per page (one per distinct “article”), and zero or more Block elements per Group element. The Block element defines a rectangle, as described above that contains all or part of a particular article. The “pageNum” attribute is the value to be displayed if any page numbers are shown in the user interface. Following the <Pages> section is the <Articles> section, which looks like this:

  <Articles>
     <Article id="a-174286635" file="article_10-1.xml">
        <title ref="headline">BIG HEADLINE</title>
        <byline ref="byline"/>
        <Summary>A short summary of the article goes here. Use it wisely.</Summary>
     </Article>

Clearly, the term “article” is a bit too magazine-specific. And finally, following the <Articles> section is the <TOC> section, which looks like this:

  <TOC>
     <TocEntry title="Cover">
        <Summary>Cover</Summary>
        <Page pagenum="0"/>
     </TocEntry>
 ...
     <TocEntry title="BIG HEADLINE">
        <Summary>A short summary of the article goes here. Use it wisely.</Summary>
        <Page pagenum="9"/>
        <Article refid="a-174286635"/>
     </TocEntry>

The TOC in a DRP contains information beyond the standard <navItem> entries in a typical NCX file (page number and summary).

[edit] For more information

Barnes and Noble Fixed format - description.

[edit] Kindle KF8

The KF8 format supports fixed layout by adding data to the OPF file to define the pages and layout parameters. The idea of size is expected to be shown in pixel values.

[edit] OPF entries

<meta name="fixed-layout" content="true"/>

This entry is defined to tell the reading program to expect only fixed format.

<meta name="original-resolution" content="1024x600"/>

This entry defines the size of the original page defined for the eBook.

<meta name="orientation-lock" content="landscape"/>

This entry can take either portrait (default) or landscape values. The entire book is expected to have the same orientation.

<meta name="book-type" content="children"/>

This is an optional entry. Current values include children or comic.

<meta name="RegionMagnification" content="true"/>

This optional value indicated that the book supports region magnification. Not all readers have this feature. Note this is regionMagnification can be used for text (font zooming). Images are also covered using the panel view feature of the reader.

[edit] Content

<a class="app-amzn-magnify" data-app-amzn-magnify='{"targetId":"fs1-txt4-magTarget", 
"sourceId":"fs1-4-txt", "ordinal":4}'>
<div id="fs1-4-txt">
 <p class="withDrop"><span class="dropcap">D</span>stands for DONKEY, - a poor patient
 beast<br/>Who thinks some fresh thistles a very great feast.</p></div></a>

Note in the example the expanded area is actually text, not an image. Enlarging permits larger text to be used. This is primarily for children's books.

<div id="page086-2">
 <a class="app-amzn-magnify" data-app-amzn-magnify='{"targetId":"page086-2-magTargetParent",
 "ordinal":2}'></a></div>

The view panels should cover the whole image (different zooms are permitted) so that the user can tap anywhere on the image. Overlaps are permitted.

[edit] For more information

http://www.amazon.com/gp/feature.html?docId=1000729511

[edit] ePub 3

ePub 3 has support for fixed layout. A fixed layout can be applied to the entire document or to individual spine elements. It can also prescribe the authors intended orientation, portrait or landscape, for the these fixed layout pages. ePub 3 has defined mapping for the above fixed layouts to conform to ePub 3 usage.

[edit] For more information

http://idpf.org/epub/fxl/

Personal tools
Namespaces
Variants
Actions
Navigation
MobileRead Networks
Toolbox
Advertisement