mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.09k stars 9.81k forks source link

Add viewer URL parameter to hide toolbar #18337

Closed ckhordiasma closed 4 days ago

ckhordiasma commented 4 days ago

Added a web viewer URL parameter for hiding the PDF toolbar. toolbar=hidden will hide the top toolbar, and changing it to anything else will restore the toolbar.

Example:

http://localhost:8888/web/viewer.html#toolbar=hidden
Snuffleupagus commented 4 days ago

Thanks for the patch, but unfortunately we cannot accept this.

First of all, please note that we generally don't want to add any non-standard hash parameters. Secondly, this could easily lead to total loss of functionality for users without any obvious way of restoring the toolbar (since a link could enable this without the user knowing). Also, the implementation seems somewhat "hacky" in the way it modifies various CSS properties manually and thus wouldn't be maintainable either.

ckhordiasma commented 3 days ago

Thanks for the feedback!