Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to collapse bookmarks #718

eduardmanas opened this issue Feb 5, 2017 · 6 comments


Copy link

commented Feb 5, 2017

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


This comment has been minimized.

Copy link

commented Feb 23, 2017

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.


This comment has been minimized.

Copy link

commented Feb 23, 2017

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.


This comment has been minimized.

Copy link

commented Jan 1, 2018

I'd like the default behaviour to be configurable, perhaps in %APPDATA%\SumatraPDF\SumatraPDF-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 :)


This comment has been minimized.

Copy link

commented Sep 5, 2018

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.


This comment has been minimized.

Copy link

commented Sep 5, 2018

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.


This comment has been minimized.

Copy link

commented Aug 28, 2019

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


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
6 participants
You can’t perform that action at this time.