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

Want to hide Sidebar #10308

Closed
jigskpatel opened this issue Nov 27, 2018 · 3 comments
Closed

Want to hide Sidebar #10308

jigskpatel opened this issue Nov 27, 2018 · 3 comments

Comments

@jigskpatel
Copy link

Configuration:

Web browser and its version: Google Chrome : Version 63.0.3239.132 (Official Build) (64-bit)
Operating system and its version: Windows 10 x64
PDF.js version: 2.0.943
Is a browser extension: No

image

I want to hide sidebar. Please give me your suggestions.

@timvandermeij
Copy link
Contributor

You can make a custom build where you remove the sidebar HTML elements and the JavaScript code that initializes the sidebar, which is https://github.com/mozilla/pdf.js/blob/master/web/app.js#L383-L403 amongst other usages in that file.

@maxmann74
Copy link

What about just by default making it hidden vs expanded? That seems like it should be some kind of a parameter or very easy change. Unfortunately the viewer.js is like 13,000 lines of code. I can't find where to keep it collapsed.

@Photon89
Copy link

Theoretically, it can be reached by a corresponding option in the URL hash: https://github.com/mozilla/pdf.js/wiki/Viewer-options It also works with the example implementation: https://mozilla.github.io/pdf.js/web/viewer.html#page=2&pagemode=none (pagemode=none is the switch in question). However, it doesn't work for me in a slightly more involved setting (pdf.js embedded in an iframe whose src is set dynamically)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants