Fixed layout ePub

From MobileRead
Jump to: navigation, search

Fixed layout (sometimes referred to as FXL) is no longer the purview of PDF, CBR/CBZ, or DjVu. It is now available in some versions of ePub and in KF8.

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. They are sometimes referred to as a "Print Replica."

[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 and iPadOS; that is iPad, iPhone, and iPod Touch, 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 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] Sony Fixed Layout Format

The Sony Fixed Layout Format is an ePub 3 which applies specific metadata properties. It allows publishers or creators to control how the title is displayed. The properties are not only for 'Fixed layout' purposes, but work for reflow text contents.

It has the following properties (the last listed in the default):

  • Orientation: portrait, landscape or auto
  • Page-spread: full, double, auto
  • fixed-layout: True, False
  • overflow-scroll: True, False
  • viewport: width, height, initial-scale, minimum-scale, maximum-scale, user-scalable (This is the same as the CSS Device Adaption: viewport in CSS3)

[edit] Example:

<package ... prefix="layout: http://xmlns.sony.net/e-book/prs/layoutoptions/" 
   unique-identifier="pub-id">
...
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
 <dc:identifier id="pub-id">urn:uuid:A1B0D67E-2E81-4DF5-9E67-A64CBE366809</dc:identifier>
 <dc:title id="title">Norwegian Wood</dc:title>
 <dc:language>en</dc:language>
 <meta property="dcterms:modified">2011-01-01T12:00:00Z</meta>
 <meta property="layout:page-spread">double</meta>
 <meta property="layout:fixed-layout">true</meta>
 <meta property="layout:overflow-scroll">true</meta> 
</metadata>

[edit] For more information

[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

While technically not an ePub the Amazon KF8 format has similar capability. 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

  • required: Each HTML document covers only one page if in portrait mode or two pages if in landscape. If two images are used for the two page spread then each should be exactly 1/2 of the total image.
  • recommendation: Make no assumptions about CSS. Explicitly define everything to ensure a browser default isn't different from what you expect.
  • Design content for full screen on the target device as measured in pixels. For the Kindle Fire this would be 1024 x 600 (aspect ratio of approximately 16 x 9) and it will maintain this ratio for all pages by scaling the input page and adding a white border as needed. Other readers should behave similarly.
  • To allow scaling for different size devices consider using scaleable values in CSS such as percentages.
  • Regional areas to be magnified need a target to click. Generally the target should be a little smaller that the area to be magnified so that the tapped areas do not overlap. The purpose of this feature is to allow enlarging an area for easier reading in a fixed size book. For example:
<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.

  • Panel view has 4 zoom levels. 100% is the original size while 1.25, 1.5 and 2.5 are zoom values. 1.5 is the normal default zoom size while 2.5 should be reserved for 2 page spread images. These are used for comics (images) CBR and CBZ input. For example:
<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.

  • A hybrid view can be used to present text over and image such that when the user taps a text paragraph will display over the image.

[edit] Fixed Layout ePub 3

Each XHTML file in the spine must have the viewport identified in the header. For example:

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

[edit] For more information

http://www.ebookconversion.reminst.com/mobi-conversion-services.html 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.

The standard defines a set of metadata properties to allow declarative expression of intended rendering behaviors of fixed-layout documents in the context of EPUB 3. It also defines mechanisms to express the intended rendering dimensions of fixed-layout XHTML and SVG content, as well as bitmap images.

[edit] Property definitions

[edit] Rendition: layout

When the rendition:layout property is specified on the Package Document meta element, it indicates that the paginated or reflowable layout style applies globally for the given Publication (i.e. for all spine items).

As ‘reflowable’ is the initial value of this property in the meta usage context, this value must be assumed by Reading Systems as the global value if no meta element carrying this property occurs in the Package Document instance. The other value is pre-paginated.

The rendition:layout property may also be specified locally on the Package Document spine itemref element, and will, in this case, override the global value for the given spine item.

[edit] Rendition: orientation

When the rendition:orientation property is specified on the Package Document meta element, it indicates that the intended orientation applies globally for the given Publication (i.e. for all spine items).

As ‘auto’ is the initial value of this property in the meta usage context, this value must be assumed by Reading Systems as the global value if no meta element carrying this property occurs in the Package Document instance. Other values include: Portrait and Landscape.

The rendition:orientation property may also be specified locally on the Package Document spine itemref element, and will, in this case, override the global value for the given spine item.

[edit] Rendition: spread

When the rendition:spread property is specified on the Package Document meta element, it indicates that the intended synthetic spread behavior applies globally for the given Publication (i.e. for all spine items). spread refers to the rendering of two adjacent pages simultaneously on the device screen and is effective depending on the orientation of the reading device.

As ‘auto’ is the initial value of this property in the meta usage context, this value must be assumed by Reading Systems as the global value if no meta element carrying this property occurs in the Package Document instance. Other values include: none, landscape, portrait, or Both.

The rendition:spread property may also be specified locally on the Package Document spine itemref element, and will, in this case, override the global value for the given spine item.

When synthetic spreads are used in the context of XHTML and SVG Content Documents, the dimensions given via viewport/viewBox metadata represents the size of one page in the spread.

By default the synthetic spread is shown in the next two viewports. Specific properties can be added to force left, right, or centered in one viewport.

[edit] Example

Fully fixed-layout content, intended to be rendered using synthetic spreads in landscape orientation, and no spreads in portrait orientation.

Package Document

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

XHTML - All content documents contain:

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

Note: to leave the spread behavior up to the Reading System, the rendition:spread element is either omitted or set to ‘auto’.

[edit] For more information

[edit] Self Publishing

Of those available, only Amazon and iBooks allows self-publishing. Sony and B&N will not allow the upload of fixed-format content to self-publishers (B&N won't allow it through NookPress; you have to have a separate type of publishing contract with them, and Sony has no self-publishing portal). It is not known if Kobo will allow the upload of fixed-format content through their Kobobooks authors' portal.

[edit] Other sites covering FXL

Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox