ePab, format for eBook
ePab has become the standard for e-book files, or eBooks, due to its ability to adapt to all types of display of reading materials.
This format is used by most reader manufacturers, with the exception of Amazon's Kindles. Amazon uses a semi-sent format. While its code was produced by MobiPocket (with minor modifications), another alternative to ePab. However, ePab (or HTML) can be converted to Mobi and Amazon KF8 using the Kindlegen utility.
The latest version for the new Kindles called KF8 (Kindle Format 8) includes HTML 5 for enhanced multimedia capabilities. Thanks to SVG and stylesheets, graphics and graphic effects are now available. Thus, it becomes possible to make dynamic comics.
Most of these features are already included in ePab 3.

IPDF (International Digital Publishing Forum), an association created to provide a standard e-book format, chose ePab.
In 1999, she first defined a format around HTML called Open eBook, and in 2007 adopted a set of three specifications, for container, formatting and content, ePab.
The Association continues to work on specifications taking into account changes in equipment.
ePab file
eBook file with .epub extension. It is in zip format and contains materials for informing about the content, for its presentation, as well as text, sound and graphic documents. Document types are defined by the standard.
The ePab standard consists of three specifications:
- OCF for the container.
- OPF for packaging.
- OPS for content.
Each of them describes the files and their contents. To summarize, the .epube file is a compressed ZIP archive containing .opf, .ncx, .xtml, .xhtml, .css and graphics files.
1) Container
This is a compressed ZIP file.
The way files are organized internally is an object of the OCF (OEPBS Container Format) specification. Two files are used to list the content.
Root manifest
This is an XML file that specifies the manifest name and its mime type. It must be named container.xml and contain this tag:
<rootfiles> <rootfile full-path="OPS/livre.opf" media-type="application/oebps-package+xml"/> </rootfiles>
The livre.opf manifest file, in turn, lists all the files in the archive.
Mimetype file
This is an ASCII file that describes the file hierarchy.
Exempli gratia:
--Conteneur ZIP-- mimetype META-INF/ container.xml OPS/ livre.opf chapitre1.xhtml image1.png css/ style.css
It duplicates the contents of the XML manifest livre.opf to present it in a more accessible form for indexing tools.
2) Packaging
It is defined by the Open Packaging Format (OPF) specification.
It must contain two XML files, a manifest and a table of contents.
Manifesto
Specifies a list of all files contained in the archive and with the .opf extension (for example, livre.opf):
<manifest> <item id="chapitre1" href="chapitre1.xhtml" medi-type="application/xhtml+xml" /> ... </manifest>
Table of contents
It is contained in an .ncx XML file. It consists of a list of headers and links to the corresponding files.
But it also contains meta-data such as the author's name and other references .
NCX stands for XML Navigation Center: XML Navigation Center.
<docTitle> <text>Titre du livre</text> </docTitle> <navMap> <navPoint id="chapitre1"> <content src="chapitre1.xhtml" /> </navPoint> </navMap>
3) Content files
The Open Publication Structure specification specifies which file types can be used in an eBook.
Content is a collection of XHTML 1.1 files for text, CSS style sheets (restricted), and media files.
Each file acts like a web page, specifies a style sheet, and contains tags for images and hyperlinks.
Encoding can be in UTF-8 or UTF-16.
Supported graphic formats: GIF, PNG, JPG, SVG.
Information and tools
- ePab 3.2. The last description of the W3C format published in 2019.
- epubcheck. Tool for checking the epub file.
- ePab library. Code in PHP for reading, writing and editing ePab files.