Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2009, 10:41 PM   #1
wz2b
Member
wz2b began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2009
Device: Kindle 2
Question Kindle 2 .mobi limitations

What are the limitations to the Kindle 2's ability to use files generated by mobigen?

I created a small sample project consisting of the files:
1.html
2.html
toc.ncx
test.opf

Using mobigen V6.2 build 41 for linux I produced a nice .mobi file that works fine on my Kindle2 but no TOC. mobigen didn't generate any warnings other than my lack of a cover page.

I might have something wrong with my source, but I don't think so -- and before I proceed any further I was hoping someone could confirm that it should work.

--Chris

toc.ncx:
Code:
<?xml version="1.0"  encoding="UTF-8"?>
<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">
<ncx version="2005-1" xml:lang="en" xmlns="http://www.daisy.org/z3986/2005/ncx/">
  <head>
    <meta name="dtb:uid" content="autofrog.com"/>
    <meta name="dtb:depth" content="1"/>
    <meta name="dtb:totalPageCount" content="0"/>
    <meta name="dtb:maxPageNumber" content="0"/>
  </head>

  <docTitle>
    <text>Chris P Daily Report</text>
  </docTitle>

  <navMap>
      <navPoint id="lvl1_1" playOrder="2">
        <navLabel>
          <text>This is the TOC entry for Chapter 1</text>
        </navLabel>
        <content src="1.html" />
      </navPoint>
  </navMap>
</ncx>
test.opf:
Code:
<?xml version="1.0"?>
<package version="2.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId">

<metadata xmlns:dc="http://purl.org/dc/elements/1.1/"
          xmlns:opf="http://www.idpf.org/2007/opf">
   <dc:title>Chris's Example</dc:title>
   <dc:creator opf:role="aut">Chris</dc:creator>
   <dc:language>en</dc:language>
</metadata>

<manifest>
 <item id="ncx" href="toc.ncx"/>
 <item id="page1" href="1.html"/>
 <item id="page2" href="2.html"/>
</manifest>

<spine toc="ncx">
  <itemref idref="page1"/>
  <itemref idref="page2"/>
</spine>

</package>
wz2b is offline   Reply With Quote
Old 03-09-2009, 10:45 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,938
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Did you test this eBook using Mobipocket Reader? I know it means going into Windows, but that's the only way to know what's what.
JSWolf is offline   Reply With Quote
Advert
Old 03-09-2009, 10:51 PM   #3
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
You can also use mobi2html to check that the generated code contains the correct tags for the TOC.
tompe is offline   Reply With Quote
Old 03-09-2009, 11:01 PM   #4
wz2b
Member
wz2b began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2009
Device: Kindle 2
Hmm you're right, it doesn't seem to work correctly on mobipocket reader for windows, either. Well, that changes the nature of my question, doesn't it :-)
wz2b is offline   Reply With Quote
Old 03-09-2009, 11:28 PM   #5
wz2b
Member
wz2b began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2009
Device: Kindle 2
Not much help

Quote:
Originally Posted by tompe View Post
You can also use mobi2html to check that the generated code contains the correct tags for the TOC.
Not much help with mobiperl ... mobi2html unpacked to a single html file. Now that file did indeed contain my table of contents, at the very beginning ... so that tells me the information is in the file.

I also tried the reverse: use html2mobi to generate a brand new .mobi and see how it showed up on the kindle. This generated different results: a kindle document that had the table of contents embedded into it at the very beginning -- but not truly a TOC. You know for sure because the TOC menu selection is grayed out.

I guess that embedding the TOC as html at the beginning of the document is okay -- but not great. I'd really like it to work correctly.
wz2b is offline   Reply With Quote
Advert
Old 03-09-2009, 11:28 PM   #6
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
I think you can just add the TOC code in the header of the html file according to the documentation on the MobiPocket web site. I also seem to remember that there was a lot of discussions about how to generate a TOC a year ago here so you can probably find something if you search (or check the wiki).
tompe is offline   Reply With Quote
Old 03-09-2009, 11:40 PM   #7
llasram
Reticulator of Tharn
llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.llasram ought to be getting tired of karma fortunes by now.
 
llasram's Avatar
 
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
The Kindle 2 appears to have support for a fairly new feature of Mobipocket format which allows for at least a single level of real metadata TOC via additional Palm DB records in the Mobipocket file. I noted that mobigen would produce these records if provided OPF with an NCX TOC, but I as nothing seemed to use them in any useful way (Mobipocket Desktop just uses them to show what "chapter" you're currently in) I didn't look into them much further.

Anyway, what is it that isn't working? Is the file not displaying at all, or is the TOC just not displaying as expected?
llasram is offline   Reply With Quote
Old 03-09-2009, 11:57 PM   #8
wz2b
Member
wz2b began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2009
Device: Kindle 2
ToC

Quote:
Originally Posted by llasram View Post
I noted that mobigen would produce these records if provided OPF with an NCX TOC, but I as nothing seemed to use them in any useful way (Mobipocket Desktop just uses them to show what "chapter" you're currently in) I didn't look into them much further.
Ahh okay. That sort of confirms what I'm seeing ... these records seem to be in the .mobi file, but the kindle2 just ignores them.

Quote:
Anyway, what is it that isn't working? Is the file not displaying at all, or is the TOC just not displaying as expected?
Yeah. As you noted, those records don't seem to be displayed or used in any way on the Kindle2. On the other hand, creating a file called toc.html then adding a "guide" section to the .opf file seemed to help:

Code:
<guide>
  <reference type="toc" title="Table Of Contents" href="toc.html"/>
</guide>
Of course I had to also add said document to the manifest.

So perhaps that's the answer?
wz2b is offline   Reply With Quote
Old 03-10-2009, 12:27 AM   #9
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Quote:
Originally Posted by wz2b View Post
What are the limitations to the Kindle 2's ability to use files generated by mobigen?

I created a small sample project consisting of the files:
1.html
2.html
toc.ncx
test.opf

Using mobigen V6.2 build 41 for linux I produced a nice .mobi file that works fine on my Kindle2 but no TOC. mobigen didn't generate any warnings other than my lack of a cover page.

I might have something wrong with my source, but I don't think so -- and before I proceed any further I was hoping someone could confirm that it should work.
What you generated is essentially an ePub, which mobigen then converted to a MOBI. The problem is that mobigen ignores the toc.ncx in an ePub and so you got the expected behavior. Calibre will use the toc.ncx when generating a MOBI, although I'm not sure if its any2mobi (or oeb2mobi) commands will work from your .opf file or if you will actually need to build an .epub.

If mobipocket ever upgrades its ePub import support to include toc.ncx then most likely what you did will work. If you want to continue to use mobigen then you need either a toc.html (contents.html) identified as the TOC in the guide items or a "tour" in the .opf:
Code:
 <tours>
  <tour id="chaptertour" title="Chapter Tour">
   <site title="Down The Rabbit-Hole" href="CarAlic.html#_RWTOC-1" />
   <site title="The Pool of Tears" href="CarAlic.html#_RWTOC-2" />
   <site title="A Caucus-Race and a Long Tale" href="CarAlic.html#_RWTOC-3" />
   <site title="The Rabbit Sends in a Little Bill" href="CarAlic.html#_RWTOC-4" />
   <site title="Advice from a Caterpillar" href="CarAlic.html#_RWTOC-5" />
   <site title="Pig and Pepper" href="CarAlic.html#_RWTOC-6" />
   <site title="A Mad Tea-Party" href="CarAlic.html#_RWTOC-9" />
   <site title="The Queen&amp;rsquo;s Croquet-Ground" href="CarAlic.html#_RWTOC-10" />
   <site title="The Mock Turtle&amp;rsquo;s Story" href="CarAlic.html#_RWTOC-11" />
   <site title="The Lobster Quadrille" href="CarAlic.html#_RWTOC-12" />
   <site title="Who Stole The Tarts?" href="CarAlic.html#_RWTOC-13" />
   <site title="Alice&amp;rsquo;s Evidence" href="CarAlic.html#_RWTOC-14" />
  </tour>
 </tours>
 <guide>
  <reference type="copyright-page" title="Copyright link" href="copyright.html" />
  <reference type="other.ms-thumbimage" title="PocketPC thumbnail image" href="PCthumb.jpg" />
  <reference type="toc" title="Table of Contents" href="Contents.htm" />
  <reference type="other.ms-coverimage-standard" title="Standard cover image" href="alice.jpg" />
  <reference type="title-page" title="About this title link" href="~cov0001.htm" />
  <reference type="other.ms-titleimage-standard" title="Standard title image" href="Ebookspine.jpg" />
  <reference type="other.ms-thumbimage-standard" title="Standard thumbnail image" href="thumb.jpg" />
  <reference type="other.ms-coverimage" title="PocketPC cover image" href="PCcover.jpg" />
 </guide>
The examples I have seen (mostly from exploded LIT ebooks) include both a tour and a contents.html, so I'm not sure if tour is sufficient on its own (a contents.html or a reference to an internal TOC in the guide items is sufficient on its own).
wallcraft is offline   Reply With Quote
Old 03-10-2009, 12:52 AM   #10
wz2b
Member
wz2b began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2009
Device: Kindle 2
wallcraft: thanks so much for the explanation. Just for completeness, I'll try making a <tour> and see how Kindle2 treats it.
wz2b is offline   Reply With Quote
Reply

Tags
kindle 2, mobigen, ncx


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle DX PDF Support Limitations sirbruce Amazon Kindle 9 05-11-2011 12:31 AM
Kindle 3 limitations? jozicka Amazon Kindle 21 10-07-2010 05:13 PM
epub -> mobi. Blank pages in Kindle 2, but not Kindle for PC notyou Calibre 0 06-28-2010 08:06 PM
Complain to Amazon about the Kindle DX PDF limitations? Sonist News 42 06-25-2009 07:04 PM
Mobi format limitations wmaurer Workshop 15 01-09-2009 02:16 PM


All times are GMT -4. The time now is 08:16 AM.


MobileRead.com is a privately owned, operated and funded community.