App Book Publishing With Baker and PugPig


Baker and PugPig are open source frameworks for creating app publications from HTML documents. This post examines how they work and makes a comparison of their features.

The Future of Mobile Device Publishing?

Book Apps on the iOS App Store

Publishing for mobile is a broad area that can encompass formats such as PDF, the web and eReader (ePUB, .mobi) documents. The web allows for custom design and behaviour, but has no inbuilt mechanism for receiving payment for content. eReader docs can be sold through online marketplaces, but the format is best suited to long-form text works and the viewing software (and to a certain extent, the end user) determines how the publication is displayed.

App books combine the best of both worlds in that you have absolute control over the appearance and behaviour of the publication, coupled with the most secure and direct method of selling and distributing your content that is currently available. The snag is that making an app is much harder than creating a web page or eReader doc.

Baker and PugPig’s solution is to provide native (currently iOS only) frameworks that let you build an app book using HTML, CSS and JavaScript. Each page is a separate .html document that is loaded into a web view. Some clever page caching techniques optimise performance whilst native controls deal with navigation. Linked and embedded content is dealt with in-app, rather than sending you to an external browser. Best of all, both iOS and Android use WebKit as their HTML rendering engine, so you can use all the latest HTML5 and CSS3 techniques without needing to worry about other browsers.

This last point is important, because in order to get an ‘app book’ accepted onto the iOS app store, it must be more than just a static collection of pages. According to Apple’s review guidelines:

“2.12: Apps that are … simply web sites bundled as apps … may be rejected.”

“2.21: … Apps that are simply a book should be submitted to the iBookstore.”

In other words, the app needs to include some sort of additional functionality to justify it being an app as opposed to a web or eReader document. Since the release of iBooks author, including some ‘multimedia’ elements such as video or an image slideshow may not be enough. Social media integration is a safer bet. Server queries, simple games or geolocation features may also be worth considering. All of these can be achieved through HTML5 and related technologies.



Baker was released in November 2010, and is an openly developed project founded by Davide ‘Folletto’ Casali. It is free to use but donations are welcomed. Most examples of publications built using Baker are small, independent titles.

The download gives you a folder containing an Xcode project and associated classes and resources. The HTML pages go in a ‘book’ folder. In addition to the pages, you have to include an ‘index’ file if you want your app to include a index bar navigation (page thumbnails that pop-up on a double-tap) and an HPub manifest file, which is a JSON document that provides details and settings for the publication. The order of pages must be listed manually in the manifest file, and the contents of the index bar, including all the thumbnail images, must be generated/inputted by hand also.



PugPig was released in November 2011, and is a commercial endeavour by Kaldor Ltd, created in response to the needs of their existing clients. The basic version is free, with additional functionality requiring payment. Some recognisable brand titles have been created using PugPig, including The Week, and even a private publication for the UK House of Commons.

The download gives you an installer that adds a project template to Xcode that can be selected when you create a new project. Saving the project generates all the necessary files. The HTML pages go in a ‘Data’ folder, and PugPig will present them in the order they appear in this folder. The index bar thumbnails are also generated automatically, and are scaled appropriately between iPhone/iPod and iPad. There is no manifest file to edit, but some basic settings, such as enabling scrolling for tall pages (not sure why this isn’t a default) can be performed by editing the Objective-C classes.

A Comparison

Baker PugPig (Free Version)
Licence BSD BSD
Platform Support iOS only iOS, Android coming soon
Device Support iPhone/iPod touch, iPad iPhone/iPod touch, iPad
Ease of Setup Intermediate – requires manual editing of HPub manifest file, table of contents and index bar Easy – create your pages and drop them into a folder
Navigation Methods Swipe page (can disable), tap edge of page (can disable), index bar, hyperlinks Swipe page, index bar, hyperlinks
Orientation Detection Yes Yes
Vertical Pagination Support
Yes No (paid version only)
Customisation Options Good – Various settings in manifest file, complete control over index bar Some – requires editing of the Objective-C classes
Page Caching Yes, can disable Yes, can disable
Internal Browser for Links Yes Yes
Documentation Introductory tutorials, GitHub community FAQs, ‘getting started’ video, wiki, GitHub community
Other Features ‘Laker’ compendium includes predefined templates that contain code for layout grids, embedded slideshows, audio, video and more Paid plans allow you to connect an app to a web-based CMS for the creation of multi-edition magazines


Both are very similar. Baker is more straightforward to customise, whereas PugPig is marginally easier to set up. The Laker compendium that works alongside Baker may also save some time building grids or interactive features from scratch, but the code formatting and file structure take a bit of getting used to, and with a bit of tweaking, Laker would probably work with PugPig too. PugPig appears to offer broader support, but Baker’s GitHub community seems to be regularly visited by the core development team.

PugPig’s big draw is the ability to hook an app up with a CMS such as WordPress or even their own hosted visual editor, but this is targeted at higher end (paying) clients and may be out of scope for independents.


Baker and PugPig offer a quick and easy way of producing app books using web standard technologies. As both mature and become more ‘cross platform’, we should see the availability of publications created using these methods increase.

If you enjoyed this post, please consider sharing it using the above buttons, leaving a comment or subscribing to the RSS feed.


  1. Hi James,

    Thanks for including us in your blog post. Good to see Pugpig and Baker getting talked about. There are a few things that aren’t 100% accurate though, so I hope you don’t mind me trying to clarify.

    We do have vertical scrolling and pagination support. We also have horizontal pagination support for multi-columned paging. See http://dev.pugpig.com/doku.php/client:ios:guides:start

    And I’d argue Pugpig is VERY customisable. You shouldn’t need to “hack” the framework files at all. The idea is that you change the support XCode project template (which is on our website here: http://pugpig.com/resources

    And you’re 100% correct that Laker will work fine with Pugpig. Another nice option is http://asidemag.com/grid/. Magazine Grid will work with Baker too.

    Lastly, I think some other differentiating features (mostly in the commercial versions though) would include:
    * local offline search
    * annotations
    * sharing (e.g. Twitter)
    * integration with Newsstand
    * integration with the app stores for subscription/purchases

    You’re right that the commercial part of the software is not open source, but the free version (Pugpig Core) is open source and licensed under the BSD license, which this is: https://github.com/kaldor/pugpig/blob/master/README.md – you can do whatever you want to with it.

    Lastly, Baker and Pugpig are good friends, and can often be found drinking together at various London tech events :-)


    • Hi Jon, thanks for the further info.

      I have updated the article to reflect your comments.

      Not sure what you mean by multi-columned paging?

      You may also want to know that I have been using PugPig with students at Plymouth University with some really interesting results. It’s a great framework, thanks for you and your team’s hard work!

  2. Hello James,

    I can confirm that we are good friends with PugPig, in fact we recommend PugPig when we face requests that are above the possibilities of Baker’s opensource community and we know are already implemented in PugPig’s commercial version. :)

    And… Thanks for the awesome article! I think you did an excellent job in detailing the two platforms and the plusses/minuses of each other.

    As for Android support, while we aren’t working there it seems that the ecosystem already produced a few sideprojects, like Friar that supports the same Hpub format: https://github.com/hanchang/Friar-Framework
    I can’t unfortunately vouch for it because I don’t have an Android tablet myself, but you might want to give it a try (and give us your opinion, so we can suggest it with a better cognition). :)

    Of course, if there’s any feature request or any suggestion you’d like to make to help us develop Baker further, please let us know. :)

    • Hi Davide,

      Firstly, thank you for a great framework, I’m really enjoying working with it.

      The main feature request I would like to see is having the option to autogenerate the HTML elements in the index. If you have a large publication, having to manually write out the list and produce the thumbnail images can be a pain.

  3. Hey James,

    Thanks for a great article. As a small independent publisher, the last couple of years feel like we’ve been holding our breath waiting. With solutions like aquafadas and ADPS promising so much but way out of the price range of niche publications that don’t want to follow a long list publishers putting crappy PDF versions of their magazines in the newstand.

    With these two solutions it appears the time has come for us to move into the digital market. Great to see the Brits excelling! Thanks for all the info.



Leave a Reply

Required fields are marked *.

MightyMeta, 8 St Lawrence Lane, Ashburton, Devon, UK, TQ13 7DD

Powered by WordPress | Theme Derived From "Yoko" by by Elmastudio

Scroll To Top