Bug 236688

Summary: Make use of table of contents data to improve page ordering in CHM files
Product: [Applications] okular Reporter: Eike Hein <hein>
Component: CHM backendAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: gassaf
Priority: NOR    
Version: 0.10.3   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:

Description Eike Hein 2010-05-07 13:50:31 UTC
Right now, even in CHM files which carry a TOC, Okular will order the pages alphabetically by file name (or actually, chmlib's chm_enumerate() does). With many CHM files, this produces a page order that is not useful for reading.

Instead, it should make use of the TOC data for page ordering if available. Any pages linked from the TOC should be put in the page list first, in the order they appear in the TOC. Then all remaining pages (as there may be pages that are not linked from the TOC but should still be reachable via the page list) can be added at the end, in alphabetical order.

(This is which kchmviewer seems to be doing as well.)
Comment 1 Gilbert Assaf 2017-06-02 18:08:44 UTC
All pages in a CHM File are now ordered accordingly to TOC Data. If a page is not in TOC, it will be added at the end. 
Reviewed at https://git.reviewboard.kde.org/r/130078/