15.01.2013 Views

Build a digital book with EPUB The open - IBM

Build a digital book with EPUB The open - IBM

Build a digital book with EPUB The open - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

developerWorks® ibm.com/developerWorks/<br />

• Specific fonts can be embedded in PDF to control the final output exactly.<br />

Three standards in one<br />

<strong>EPUB</strong> consists of three separate IDPF specifications, although in practice,<br />

it's safe to refer to them collectively as EPeUB:<br />

• Open eBook Publication Structure Container Format (OCF):<br />

Specifies the directory tree structure and file format (ZIP) of an<br />

<strong>EPUB</strong> archive.<br />

• Open Publication Structure (OPS): Defines the common<br />

vocabularies for the eBook, especially the formats allowed to be<br />

used for <strong>book</strong> content (for example, XHTML and CSS).<br />

• Open Packaging Format (OPF): Describes the required and<br />

optional metadata, reading order, and table of contents in an <strong>EPUB</strong>.<br />

Additionally, <strong>EPUB</strong> reuses several other standards, such as XHTML<br />

version 1.0 and Digital Accessible Information SYstem (DAISY), for specific<br />

types of content <strong>with</strong>in the <strong>EPUB</strong> archive.<br />

From a software developer's point of view, PDF falls far short of the ideal:<br />

• It's not a trivial standard to learn; therefore, it's not a simple matter to throw<br />

together your own PDF-generating code.<br />

• Although PDF is now an International Organization for Standardization (ISO)<br />

standard (ISO 32000-1:2008), traditionally it has been controlled by a single<br />

corporation: Adobe Systems.<br />

• Although PDF libraries are available for most programming languages, many<br />

are commercial or are embedded in GUI applications and not easily controlled<br />

by external processes. Not all free libraries continue to be actively maintained.<br />

• PDF-native text can be extracted and searched programmatically, but few PDFs<br />

are tagged such that conversion to a Web-friendly format is simple or reliable.<br />

• PDF documents aren't easily reflowable, meaning that they don't adapt well to<br />

small screens or to radical changes to their layouts.<br />

Why <strong>EPUB</strong> is friendly to developers<br />

<strong>EPUB</strong> addresses all the flaws in PDF as they relate to developer friendliness. An<br />

<strong>EPUB</strong> is a simple ZIP-format file (<strong>with</strong> an .epub extension) that contains files ordered<br />

in a proscribed manner. <strong>The</strong>re are a few tricky requirements about how the ZIP<br />

archive is prepared, which will be discussed in detail later in Bundling your <strong>EPUB</strong> file<br />

as a ZIP archive. Otherwise, <strong>EPUB</strong> is simple:<br />

• Nearly everything in <strong>EPUB</strong> is XML. <strong>EPUB</strong> files can be built using standard XML<br />

toolkits <strong>with</strong>out any special or proprietary software.<br />

• <strong>EPUB</strong> content (the actual text of an eBook) is almost always XHTML version<br />

1.1. (An alternative format is DTBook, a standard for encoding <strong>book</strong>s for the<br />

visually impaired. See Resources for more information on DTBook, which is not<br />

covered in this tutorial).<br />

• Most of the <strong>EPUB</strong> XML schemas are taken from existing, published<br />

specifications that are freely available.<br />

<strong>Build</strong> a <strong>digital</strong> <strong>book</strong> <strong>with</strong> <strong>EPUB</strong> Page 4 of 25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!