Sumatrapdf: Option to collapse bookmarks

Created on 5 Feb 2017  Â·  9Comments  Â·  Source: sumatrapdfreader/sumatrapdf

It would be nice if we could collapse all bookmarks in one go.

A document is usually structured in Chapters, and each chapter into several sections and subsections.

When Sumatra PDF opens a document, the bookmark tree is fully expanded. Depending on the document structure, the bookmark tree might be many levels deep. This makes it hard to understand the document structure.

Ideally, we should have a way to collapse these bookmarks, so we can work at Chapter level. When I then expand on a chapter, I would like to see the major sections of the chapter. If I then expand on a section, then I would like to see its subsections, and so on.

Many thanks

Most helpful comment

I would like to add my voice to this. I have PDFs with pretty extensive bookmarks.

Having them collapsed by default sounds like the more natural default.

All 9 comments

Hi Eduard, I also wanted this, and was ready to roll up my sleeves and do some coding, but I went to look at the source code, and.... it is already there!!

  • To collapse ALL bookmarks (regardless of what level you are currently on, and even if there is not a single top-level bookmark), press SHIFT-NumpadDivide (the slant/forward-slash key). It MUST be the divide key on the the numeric keypad. The regular divide key will not work.
  • To re-expand ALL bookmarks, SHIFT-NumpadMultiply (the asterisk/star key).

Hope this helps.
dale

Hi Dale, thanks very much for the tip!

Yes, the shortcuts Shift + / and Shift + * work as expected. I am happy with that!

It would however be nice if there was a menu item for this. And here I am thinking about the average user. Shortcuts are not as easy to use as buttons/menu items, and to be fair, not very well documented either.

I'd like the default behaviour to be configurable, perhaps in %APPDATA%SumatraPDFSumatraPDF-settings.txt. I would prefer Eduard's suggestion as default behaviour. Also my laptop doesn't have a numpad so the keyboard shortcut is of limited use :)

I would like to add my voice to this. I have PDFs with pretty extensive bookmarks.

Having them collapsed by default sounds like the more natural default.

The default is once they are opened and "remember these settings for each document" is true for them to re-open at the same level they were closed so for closure at level 1
TocState = # # …
where # can be a variable number recording a "collapsed" section thus will vary as follows
The default of all open resets and deletes the different entries
So when first opened OR closed with all expanded there is no status for the TOC on file opening
Bookmarks can vary widely depending on the author, thus for some with a single root it may make sense to open one level up, but for those without a root it would be different, the one known layout that can NOT vary between sources is open ALL (if available !) since we don't know which ones the user wishes to be collapsed, perhaps the reason that is the default.

Hi there
thanks for your work,, SumatraPDF is very nice.

as many user i have a laptop with no numpad so i can't use this shortcut
and i have a french keyboard.
it would be nice to be able to customize these shortcut or to use a FUNCTION key.

Best regards

Pierre

@kjk can we agree the rightclick and enter key enhancements will be kept in full release ?

Yes. To sum up:

  • Enter toggles the collapsed / expanded state of currently selected node. When at root of tree, it collapses / expands the whole tree
  • there's a context menu on bookmarks tree with Expand / Collapse items

@kjk you may note the open flag on a pull request showing should also have now been addressed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kjk picture kjk  Â·  4Comments

lollita picture lollita  Â·  5Comments

kloked picture kloked  Â·  6Comments

bigretromike picture bigretromike  Â·  8Comments

carlvn picture carlvn  Â·  3Comments