Wednesday, September 19, 2012

Book Proofer, Caching, and iBooks

I just posted an update to my blog post about choosing a proportion for the viewport in Fixed Layout EPUB ebooks. I got some figures wrong originally because even though I had changed the EPUB and thought I was looking at the latest version, iBooks was holding out on me and showing me an older version.

I often use Book Proofer, especially when I'm working on Fixed Layout ebooks for the iPad. Book Proofer is a free tool that you can get if you have a full iTunes Connect account. (There are two kinds of iTunes Connect accounts, one for making books available for free and one that lets you sell ebooks through the iBookstore. Apple makes some tools available to holders of free ebook iTunes Connect accounts, but unfortunately, they only give Book Proofer to those who have signed on to sell ebooks through their store. What do you need to get the full account? One ISBN, a US Tax id, and your bank information. In my opinion, it's totally worth it, and you get the ability to sell ebooks as well.)

So what does Book Proofer do? When you drag an EPUB folder (you can drag a zipped EPUB, but why bother?) on top of the Book Proofer window, the book automatically syncs to iBooks on any connected iOS device that has iBooks open. Almost instantly.

And then, you can make changes to the XHTML and the CSS files and see the changes updated in the iPad on the fly. Book Proofer is really an invaluable tool for creating Fixed Layout for iBooks.



I found out on Tuesday, however, that not all changes are updated right away. I was playing around with the viewport size, trying to see if I could find a perfect horizontal page size that would fit perfectly and take maximum advantage of the iPad's screen. It turns out that Book Proofer won't update changes to the viewport. Let's see:



Now, anybody who has been working with iBooks for the last two years is probably familiar with its peculiar caching issues. I first discovered that iBooks wouldn't show you the latest version of an ebook unless you both deleted the iTunesMetadata.plist file from the EPUB and also changed the value in the dc:title value in the OPF file.

But, on Tuesday, I couldn't make that work. I think part of my problem was the order in which I was making the changes. Since I wanted to change the OPF file, the three XHTML files and the CSS file, I made the changes in whatever order I found the files on my desktop.

Not only that, sometimes I made the changes with the ebook open in iBooks, and sometimes I went back to the list.

I have found that the order matters, and sometimes you have to go back to the list.

So, if you want to change the viewport, first make and save the changes in the XHTML and CSS. Then, change the value of the dc:title element. When you save, iBooks should automatically close your document and display your list of EPUB books. It will replace the older ebook with the newer titled one. When you open that new document, you should find that the viewport has been properly updated.



Changing the dc:identifier element also works, as long as you do so while the book is closed. It also has the added benefit of creating an additional book instead of replacing the previous one, which can be helpful if you're trying out a series of changes and want to be able to go back and revisit earlier ones.

You can also change the dc:date element to track when the changes were made.

The important thing to remember is to make the changes to the XHTML and CSS files first, and only then change the dc:title, dc:identifier, and/or dc:date.

9 comments:

  1. What do you need to get the full account? One ISBN, a US Tax id, and your bank information.
    ....and of course an Apple iMac.

    ReplyDelete
  2. What do you need to get the full account? One ISBN, a US Tax id, and your bank information ... Hilarious: how can someone even think of doing business with such level of tech support? Buggy docs for everyone, but tools only for the US pros, really?

    ReplyDelete
  3. Been changing the dc:date and dc:identifier for quite some time to avoid caching issues in iBooks (I think it was one of the tips you had in your EPUB Straight to the point book way before Book Proofer was available)

    I'm having a strange syncing issue with Book Proofer:
    it seems to be working fine on my main machine (iMac) - caching issues are solved following some of the methods you've mentioned

    but on my secondary computer (macbook) Book Proofer displays the initial proof in iBooks but then refuses to sync any changes no matter what (I'm editing files using oXygen in both cases). Reinstalled both BookProofer and oXygen but problem persists.

    I wonder if anyone has experienced similar inexplicable issues non syncing issues with Book Proofer

    I'm forced to to test epubs the 'oldschool' way: load various versions with different identifier numbers to iBooks, which works but is inefficient :)

    ReplyDelete
  4. Reinstalling iBooks app fixed the issue, try that if you're having similar problems :)

    ReplyDelete
  5. hi Liz,
    your tutorials are awesome.
    I have some problems with epub3 fixed layout.
    when I put an image with a link to open the image in full screen mode it doesn't work!!! I get the full screen mode but the picture doesn't appear !!

    ReplyDelete
  6. warning with Viewport size:- in fixed layout, if viewport size is not specified in the xhtml pages or set to device-width then the whole book curls up into a tiny weird shape. with the caching in iBooks this was not noticed, but when the dc:identifier changed the whole book became tiny.
    So setting a viewport width and height seems mandatory to work in iBooks. any one seen this before ?

    ReplyDelete
    Replies
    1. Viewport has always been mandatory for FXL in iBooks (not related to dc:identifier in my experience). I thought that weird folded up thing had gone away with new version of iBooks—you might want to check if you have latest version.

      Delete
  7. Thanks Liz.
    I am using latest version of iBooks.
    yes. not related to dc:identifier, changing it, removed cache and i could see the issue.

    ReplyDelete
    Replies
    1. Viewport is required in all XHTML files in FXL, and it must also be the same across all files. Nothing new there. Am I missing what you're trying to say?

      Delete

More of my books