From MobileRead
Jump to: navigation, search

The mPub format is supposed to be a "mobile optimized" version of the ePub format.


[edit] Origin

It was created by Mobcast as part of their white labelled eBook store and reader package. This package is in use in the mobile bookstores for WH Smiths and GoSpoken, as well the mobile book stores for 3 major UK mobile phone operators (Orange, Vodaphone and T-Mobile).

Mobcast's website describes the mPub format in the following excerpt:

"eBook and eReader apps are built from a mobile-optimised form of the standard ePub file format, which Mobcast calls mPub."Source: Mobcast website

The file format is superficially similar to ePub, in that it consists of a zip file (effectively renamed to have a .mpub file extension), containing XML files, HTML files and images and CSS.

Delving deeper however, reveals the XML and directory structure bears little to no resemblance to the ePub specification. mPub files are therefore not readable with any standard ePub application.

It looks like the mobile version and the standard ePUB coexist on most eBook store sites. If you download via a computer you get the ePUB and if you download via a mobile phone using the special application you get the mpub version.

[edit] mPub File Structure

An example mPub structure is as follows:

Container zip file: MyBook.mpub
[cover image file, this is a tiny file, only 128 x 128 pixels, its purpose is for the browser. There can be a larger cover image in the book itself.]
[XML file containing table of contents (TOC) and descriptive data. TOC consists of "section" tags with id properties which correspond to the numbers in the html files in the sections directory e.g. ./sections/section_0000.html corresponds to <section id="0"> in metadata.xml ]
./css [dir]
[cascading style sheet file. This one is the same in all versions and is intended to override the normal CSS forcing 0 margins and a few other things. It is not in the ePUB version of the document.]
./css/stylesheet.css [cascading style sheet file]
./images [dir]
./images/ [various image files referenced in the HTML in the "sections" directory]
./sections [dir]
[HTML file - contents "section 0" of the book. These files have identical content to the ePUB version except the addition of a reference to the mobcast.css file. The file names in the ePUB file can be different and may be more descriptive.]
./sections/section_9999.html [HTML file - contents "section 9999" of the book]

[edit] mPub XML file

The guiding document of the mPub file is hardcoded to metadata.xml and is at the root of the document. A sample is shown below:

?xml version="1.0" encoding="UTF-8"?>
       <title>Book Title</title>
       <author>Authors Name</author>
       <publisher>Publisher's name</publisher>
       <copyright>(c) statement</copyright>
       <build_date>2011-02-11 08:05:00</build_date>
       <section id="0" depth="0">Cover Page</section>
       <section id="1" depth="0">Title Page</section>
       <section id="2" depth="0">Excerpt</section>
       <section id="3" depth="0">About the Author</section>
       <section id="4" depth="0">Chapter One</section>
       <section id="5" depth="0">Chapter Two</section>
       <section id="6" depth="0">Chapter Three</section>
       <section id="7" depth="0">Chapter Four</section>
       <section id="8" depth="0">Preview</section>
       <section id="9" depth="0">Copyright</section>

As can be seen, it is much simpler than the equivalent ePUB metadata document. It is likely that all entries are required although they might have zero content. The content section serves to find the files and also to generate the TOC.

[edit] Use in Mobile Apps

As part of the UK launch of the Samsung Galaxy Tab, customers were able to claim a voucher code for use in the WH Smith eBooks (reader and store) app on the Android platform. The app uses Mobcast's technology hosted through GoSpoken but branded as WH Smith.

Unfortunately, there have been many reports of the app being very unstable and difficult to use [1][2][3][4][5]

As a result, some users have been investigating ways to open the mPub format books purchased from the WH Smith mobile store in other applications [6][7].

Findings so far suggest that there is no DRM as such on the mPub files downloaded by the WH Smith eBooks app for Android, but they are stored in a folder not accessible with standard user access under Android.

The folder concerned is ./data/data/ which is only accessible if the device has "root access" enabled and an advanced file browser such as "Ghost Commander" is used. The mPub files can then be unzipped to reveal the file structure as described in the "mPub File Structure" section above.

[edit] mobcast.css

* {
   color:#000000 !important;
   margin-left: 0px !important;
   margin-right: 0px !important;
img {
a:link, a:visited, a:hover, a:active {
   text-decoration:none !important;
   color:#000000 !important;
.h1 {
   font-size: 200%;
.h2 {
   font-size: 150%;
.h3 {
   font-size: 120%;
.h4 {
   font-size: 100%;
.h5 {
   font-size: 89%;
.h6 {
   font-size: 60%;

[edit] References


[edit] Other Sources
Personal tools

MobileRead Networks