Link to PDF file (or attach file here):
WorkingwithBookmarks.pdf
Configuration:
What is the expected behavior? (add screenshot)
The sidebar is not open on load
What went wrong? (add screenshot)
You get the exact same behaviour in Adobe Reader as well, since the PDF file itself specifies that this should happen when the document is opened (through the /PageMode /UseOutlines
entry in the Root of the document).
In the PDF.js default viewer however, this behaviour can be turned off by setting the disablePageMode
preference to true
if you do not wish to use this functionality.[1]
Closing as answered, since this is working as intended.
[1] Setting the preference is done by executing PDFViewerApplication.preferences.set('disablePageMode', true);
in the console, and then reloading the viewer.
For users who do not want the sidebar to open automatically and are baffled by the above reference to the console:
(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.
(2) In the search box above the list, type or paste pdfjs and pause while the list is filtered
(3) Double-click the pdfjs.disablePageMode preference to switch the value from false to true
Now instead of the relevant panel opening automatically, if the PDF specifies that it should be displayed a green dot will appear on the sidebar button to alert you.
Most helpful comment
For users who do not want the sidebar to open automatically and are baffled by the above reference to the console:
(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.
(2) In the search box above the list, type or paste pdfjs and pause while the list is filtered
(3) Double-click the pdfjs.disablePageMode preference to switch the value from false to true
Now instead of the relevant panel opening automatically, if the PDF specifies that it should be displayed a green dot will appear on the sidebar button to alert you.