Adding a Cover and Table of Contents for a DTP Kindle File

A lot of folks seem to run into trouble with adding a cover or – worse – adding a Table of Contents (TOC) to the HTML file they want to upload to Amazon’s Digital Text Platform (DTP) for titles published in the Amazon Kindle Store. It’s not as bad as it looks!

Here’s the basic code for how to do it:

<div id=”cover”>
<center>
<img src=”mycover.jpg”>
</center>
</div>
<mbp:pagebreak />
<div id=”toc”>
<p>Table of Contents</p>
<p><a href=”#one”>One</a></p>
<p><a href=”#two”>Two</a></p>
</div>

<mbp:pagebreak />
<p><a name=”one”>One</a></p>
<p>Text for chapter one here…</p>
<mbp:pagebreak />
<p><a name=”two”>Two</a></p>
<p>Text for chapter two here…</p>

Note that the TOC will probably not work on the DTP preview tool (at least as of this writing), but I tested this code on my Kindle, and the menu functions for the TOC worked properly, and the cover image also showed up properly.

For more tips and information on publishing your book through Amazon DTP, check out Publish Your Book On The Amazon Kindle: A Practical Guide (there’s also a Kindle version).


Related Posts

  1. Kindle Publishing Tip: Formatting Differences With Kindle 2 If you publish (or are interested in publishing) on the Amazon Kindle, I wanted to direct your attention to an outstanding post by Joshua Tallent from www.kindleformatting.com on some of the display differences in formatting between the Kindle 1 and...
  2. Publish Your Book on the Amazon Kindle: A Practical Guide It’s no surprise that there are a lot of authors and small press publishers who want to get their work on the Amazon Kindle! Unfortunately, making that happen is not always as easy as it should be, and that’s why...
  3. KindleFormatting.com – Good Info for Publishing on Amazon Kindle I just wanted to point out a good source of information on formatting your document for the Amazon Kindle: kindleformatting.com by Joshua Tallent. There is of course a lot of information and current discussion on the Amazon DTP forums, but...
  4. The Amazon Kindle – Cool! In all the fuss and flurry of trying to promote In Her Name, it suddenly occurred to me that I haven’t really mentioned too much about the device that finally motivated me to get the book published: the Amazon Kindle....
  5. “In Her Name: Empire” is Now Available for Kindle and Mobipocket I hadn’t mentioned it in any of the earlier posts (I don’t think!), but I just wanted to make sure that you knew that In Her Name: Empire is indeed available both for the Amazon Kindle and as a Mobipocket...

,

  1. #1 by Pat King on February 18th, 2009 - 12:53 pm

    Thanks! This will come in handy.

  2. #2 by Gary Lacey on February 24th, 2009 - 8:21 pm

    Michael, I’m new to the Kindle forum, and e-publishing, but you seemed to be the Forum de facto ‘expert’ if there is one; thought you may have some insight into a problem inserting and uploading a “cover image”.

    Note this upload error:

    Error code: ConversionError Error message: amazon.DigitalOpenPublishing.util.zip.UnzipException caught when trying to unzip file=/var/tmp/dtfc/s3Get/ticket_1216784/dtp_207096_USER_CONTENT_0.zip; ErrorCode=ConversionError
    **

    I’ve received the same “Zip” error repeatedly — as I’m trying to discern exactly how to add a cover-image to my file and I presume it’s to point the html doc image tag to the cover-image within the same folder and then zip the two documents (html doc and image) and then upload to DTP.

    However, when I attempt to upload the zipped file, I receive the error message above repeatedly. I utilized BBEdit (I use a Mac) to write html file, saved it in Word, and zipped it in a folder with a Photoshop .jpg file of the cover (sized correctly iin all respects). Sorry for the verbosity, but I *greatly* appreciate any insight and kind assistance with process clarity.

    And, am I correct in my assumption as to how to insert a cover image to a book doc?

    (This forum is very helpful, but one has to dig continuously to unearth info that should be comprehensively included in the DTP tutorial… It makes far too many presumptive jumps.)

    Thanks very much for the assist.

  3. #3 by Gary Lacey on February 24th, 2009 - 8:22 pm

    Sorry. When I refer to “forums” in my prior comment I meant Amazon’s DTP forum; not yours. This blog is great.

  4. #4 by Michael R. Hicks on February 24th, 2009 - 9:35 pm

    Gary – Okay, I think you’re adding too many steps for yourself here. :)

    What you need to do first is take the HTML you saved out and zip that together with the image(s), but don’t both messing around with Word after that. The ideal format is HTML, so once you’ve got it there, stick with it! The only caveat is that you have to make sure that the HTML file is saved in Latin-1/Western format, and not Unicode.

    Second, since you’re on a Mac (as I am), you need to make sure that you save the ZIP file in a format that is Windows compatible: DTP does *not* like Mac-flavored files. Most Mac archive programs have some sort of setting or check box for that.

    Then try reuploading the resulting zip file to DTP.

  5. #5 by Michael H. on March 4th, 2009 - 6:48 pm

    Hi – this is great. Thanks. I have a question regarding converting and previewing. To see how my book is formatting for the Kindle I converted my Word doc to HTML and then have been editing the html version in Word. Then I convert using Mobipocket and upload the .prc files to my Kindle for viewing.
    I uploaded to DTP but then I can’t preview through my Kindle to see how it looks. I have a lot of graphics and want to control the flow of the text somewhat so it doesn’t look funky. This is why i want to preview frequently chapter by chapter. My book is a 190,000 word historical novel, so it’s pretty unwieldy.

    So, will there be a problem with doing my whole book this way and then uploading through DTP for the final version? Will it look different than the Mobipocket version? Mobipocket makes it pretty easy to add jpeg files and covers. But I have noticed that the Table of Contents I created in the HTML version does not sync with the TOC link in the Kindle. So the reader can’t jump to the TOC from anywhere in the book. I’ve noticed this a lot with sample books I’ve downloaded from the Kindle store. Table of Contents in the scroll bar menu is grayed out.

    Will your html code above fix this?

    Thanks for any help,
    regards,
    Michael

  6. #6 by Michael R. Hicks on March 4th, 2009 - 7:50 pm

    Michael -

    I haven’t verified it myself, but I suspect that no, the Word-created TOC won’t work on the Kindle. The only two ways that I know of to create a TOC is 1) use the tags and anchors as displayed in the article above, or 2) to use the TOC utility in Mobipocket Creator.

    The TOC utility in Creator is a bit tricky to use unless you understand what it’s asking for; it’s probably easier – if a bit more manually intensive – to add the tags/anchors by hand to the HTML. And yes, the above code will “enable” the menu feature on the Kindle.

    Finally, if you built a PRC file and uploaded it to your Kindle, that’s what the file is going to look like to readers who but it from the Kindle store. So if it looks okay to you on your Kindle, you should be set. :-)

  7. #7 by Michael H. on March 4th, 2009 - 8:50 pm

    Thanks Michael. A quick clarification and follow-up. I created a TOC by using bookmarks in HTML and the links work fine in the Kindle, but the Kindle file doesn’t recognize the TOC as a TOC so it doesn’t enable the menu feature on the scroll bar.

    I’ll try using tabs and anchors as that seems cleaner. The TOC wizard in Mobipocket was too confusing with the terms used as I haven’t programmed in HTML much and I’m not sure what the headers and classes etc. refer to. Do you recommend a simple html guide?

    Thanks again.

  8. #8 by Michael H. on April 21st, 2009 - 7:13 pm

    Hi Michael,
    I’m back and having some difficulties adding a toc to my MobiPocket build. I’m dealing with an html test file and I have the href lines for toc links in the code. Then I added the and the before and after the Table of Content lines as you show above.
    But it didn’t work when I uploaded to the Kindle.

    Is this for a DTP build only?
    I’m just trying to build a simple toc test file before I go to my book which is 190,000 words. But I want to use Mobipocket Creator for the Kindle.

    My interior links in the book work fine, but no toc in the Kindle menu. I need this for navigation around such a big book.
    Any ideas?

  9. #9 by Frank Tuttle on May 11th, 2009 - 10:19 am

    I see numerous references to a zipped file containing the cover image and the rest of the book, but I’ve never been able to find a step-by-step guide to how to combines all that. Is there a thread or an Amazon help document or anything out there that will tell me how to do this, what to name things, what NOT to name things, all that? If there is, I’ve failed to find it. I managed to get a cover image on the Amazon sales page, but I’ve got no clue about how to get one on the ebook itself. Thanks! Great blog, by the way!

  10. #10 by Michael R. Hicks on May 11th, 2009 - 8:00 pm

    Frank-

    Okay, this is an easy one! :-)

    First, in your HTML code, if you used the sample code I indicated in this blog post, look closely at the third line:

    img src=”mycover.jpg”

    Change mycover.jpg to whatever your cover filename is. Don’t worry about conventions – the only real things to make sure of is that 1) the name doesn’t have any spaces in it, and 2) make the .jpg lower case.

    Now, I’m assuming you have a Windows machine, so you’ll need to do something like this:

    1. Make sure both the HTML file and your cover image that you want “inside” the file (e.g., “mycover.jpg” or whatever) are in the same folder on your hard drive.

    2. Select both files (left click on the first, and control + left click on the second to highlight both).

    3. Right click over one of them (doesn’t matter which – they should both still remain highlighted).

    4. In the menu that comes up, there should be something that looks like Send To -> Zip File. Left click on that option.

    5. A ZIP file should appear on your hard drive that should contain the HTML and cover image files.

    6. Upload the ZIP file to DTP in section 2!

    Lastly, thanks for the comments on the blog – I’m glad it was of use! :-)

    If you have any other questions, just let me know!

    Frank Tuttle :

    I see numerous references to a zipped file containing the cover image and the rest of the book, but I’ve never been able to find a step-by-step guide to how to combines all that. Is there a thread or an Amazon help document or anything out there that will tell me how to do this, what to name things, what NOT to name things, all that? If there is, I’ve failed to find it. I managed to get a cover image on the Amazon sales page, but I’ve got no clue about how to get one on the ebook itself. Thanks! Great blog, by the way!

  11. #11 by Frank Tuttle on May 13th, 2009 - 12:57 pm

    Thanks so much! That’s exactly what I needed. Now I too will soon have a cover inside the e-book. I absolutely detest that ‘no image available’ tag, and now I won’t have to face it. Thanks again, you, sir, doth ROCK!

  12. #12 by Michael R. Hicks on May 13th, 2009 - 12:59 pm

    Frank Tuttle :

    Thanks so much! That’s exactly what I needed. Now I too will soon have a cover inside the e-book. I absolutely detest that ‘no image available’ tag, and now I won’t have to face it. Thanks again, you, sir, doth ROCK!

    Frank – That’s great, and you’re welcome! :)

  13. #13 by Deb on May 31st, 2009 - 3:40 pm

    Hi, Michael…

    I stumbled across this thread while trying to find an answer to a question I have about Kindle cover images. That’s the last thing I need to do (I think) before I can upload my novel. I’ve never used Kindle before–just have regular softcover book on Amazon.

    Anyhow, what I’m trying to figure out is this statement: File names must consist of the product identifier (Amazon ASIN, 13-digit ISBN, EAN, JAN, or UPC) followed by a period and the appropriate file extension. Example: B000123456.jpg or 0237425673485.tif

    Well, I don’t have an ISBN. I have no idea how I’d get a UPC (do I need one?) and I don’t know what EANs or JANs are. So how do I know what to title my cover image? I can’t find anything by searching Amazon’s site or the forums to answer this. The only thing I see is in the FAQ, where it says you don’t need an ISBN for a Kindle book. I’d originally assumed I could name my cover image file anything I wanted (ie. the title of my novel, maybe, without spaces, etc.) but it doesn’t sound like it. I need some sort of number … but I don’t know where to get it.

    Any help would be VERY appreciated.

    Deb

  14. #14 by Michael R. Hicks on May 31st, 2009 - 3:45 pm

    @ Deb

    Deb – This is an easy one! Despite the instructions on DTP (which are woefully out of date), the only rules you need to follow for naming your cover image file are:

    - don’t use spaces in the filename
    - put the type extension in lower case (e.g., “jpg” not “JPG”)

    That’s it. You don’t need any of th rest of that gobbledigook that the instructions say you do. :-)

  15. #15 by Deb on May 31st, 2009 - 4:58 pm

    Oh, phew! Thank you so much. I’ve been perusing some of the other Kindle posts here in the meantime. This is more helpful than the Amazon site. Now to see what else is here….

    Thanks again!

  16. #16 by Deb on May 31st, 2009 - 7:46 pm

    Hi, um … I’m back. I don’t mean to be a pest, but … to upload a Kindle cover image, I just click on Browse, click on my file, click open … and wait how long? I’ve been waiting and waiting. Seems like a half-hour already. And that’s the second time I’ve tried. Is it supposed to take this long? At the bottom of my screen, it says, “1 item remaining. Downloading picture…” etc. I don’t recognize the filename: https://images-na.ssl... (etc.) So I’m not sure what’s going on. Does this ring a bell?

    The filename has the proper format and small .jpg. Sized according to their requirements. Hmm….

  17. #17 by Deb on May 31st, 2009 - 11:41 pm

    Okay, cancel that. I figured it out. It was an incompatibility issue with IE. I downloaded Firefox and all went well. So far.

  18. #18 by Jonathan on June 10th, 2009 - 5:06 pm

    Hi Michael,
    I’m trying to publish a graphic heavy book (where every page is a graphic). When I send a .zip file to my amazon free-conversion email address, it seems to individually convert every file rather than notice that one is an html file that USES the image files.

    Any advice?

    Thanks.

  19. #19 by Pat on June 24th, 2009 - 4:30 pm

    Michael,

    Thanks for the HTML code for the TOC. Can you tell me how to treat sub-headings for chapters that would be down one level? How would I put that in terms of HTML Code?

    Thanks!

  20. #20 by Pat on June 25th, 2009 - 4:54 pm

    Michael,

    Disregard my last question, I am using the H1, H2 tags and putting it in by hand in my HTML document that Mobi created, then using the TOC wizard. That is enabling me to make headings and subheads. :-D

  21. #21 by Michael R. Hicks on June 26th, 2009 - 7:33 pm

    Jonathan :

    Hi Michael,
    I’m trying to publish a graphic heavy book (where every page is a graphic). When I send a .zip file to my amazon free-conversion email address, it seems to individually convert every file rather than notice that one is an html file that USES the image files.

    Any advice?

    Thanks.

    Jonathan -

    Sorry for the late reply! The problem is that a zip file is not the format that the Kindle is set up to accept, and when you use the email service, it does just what you’ve seen: unzips the file and sends the individual pieces to your Kindle.

    Right now, the only way to really test what your file might look like on an actual Kindle is to use Mobipocket Creator to generate a PRC file, which is a close relative of the Kindle’s native AZW file, and that you can then send to your Kindle.

    Hope that helps!

You must be logged in to post a comment.


Get Adobe Flash playerPlugin by wpburn.com wordpress themes
SetPageWidth