Wow, this was taken care of really fast!
Guess i'll then have to work around this koreader quirk regarding nested TOC's by fixing them manually whenever (rarely!) i happen to stumble over any book PDF with this "feature"...
For the curious:
Using pdftk, the table of contents (aka bookmarks) can easily be extracted with following command:
Code:
pdftk sample.pdf dump_data output datadump.txt
Use any suitable text editor of choice to modify the bookmark data contained in the resulting file (admittedly, not for the faint of heart). Rejoin the results with PDF file as follows:
Code:
pdftk sample.pdf update_info output datadump.txt output corrected.pdf
PDFtk is availabel for free at
www.pdflabs.com/tools/pdftk-the-pdf-toolkit