Skip to content

TOC just wrong in random(?) ways #11

Description

@raiju

TOC positions seem to not be interpreted correctly, with an inconsistent error. Using the following code to generate a book:

$mobi = new MOBI();

$mobi_content = new MOBIFile();
$mobi_content->set("title", "My first eBook");
for($i = 0; $i < 20; $i++){
    $mobi_content->appendChapterTitle(($i+1)."这是什么鬼呀".($i+1));
    for($j = 0; $j < 20; $j++){
        $mobi_content->appendParagraph("P".($i+1).".".($j+1)." 许子晴娇嗲的戳了戳身边男子的手臂,小声抱怨了一句:“爸,你看你说的,我这不是见了偶像太兴奋了吗,哪有你这样拆自己闺女的台的……” ".($i+1).'-'.($j+1));
    }
    $mobi_content->appendPageBreak();
}
$mobi->setContentProvider($mobi_content);

$mobi->download("first.mobi");

and using the TOC for e.g. the 12th chapter breaks things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions