Skip to content

Implement parameter navpanes and toolbar #2784

Open
@jviereck

Description

@jviereck
Contributor

See: https://bugzilla.mozilla.org/show_bug.cgi?id=844350

with the acrobat pdf plugin i can pass navpanes=0 and toolbar=0 to hide the toolbars

The parameters are specified here: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/pdf_open_parameters_v9.pdf#page=7

Activity

jviereck

jviereck commented on Feb 23, 2013

@jviereck
ContributorAuthor

Issue #2676 might serve as an starting point on how to implement this.

Snuffleupagus

Snuffleupagus commented on Feb 23, 2013

@Snuffleupagus
Collaborator

Should we implement the "navpanes" parameter?
In Adobe Reader the "navpanes" are separate from the toolbar, but in pdf.js these can't be acessed if the toolbar isn't visible. I suppose that you could just hide the sidebar button if "navpanes=0", but do we want to do that?

kekkc

kekkc commented on Feb 17, 2018

@kekkc

#9414 was closed with a reference to this issue, but I'm not sure if the parameters are the same as "auto-hide" toolbar. In case someone is searching for a workaround to gain space or some different ideas of implementation, create a userContent.css in profile>chrome with the following content (instead of hiding the toolbar completely, it's just made transparent:

/* https://support.mozilla.org/de/questions/1119523 */
#outerContainer #mainContainer div.toolbar {
  /*display: none !important; */ /* hide PDF viewer toolbar */
  opacity: 0.5 !important;
}
#outerContainer #mainContainer #viewerContainer {
  top: 0 !important; /* move doc up into empty bar space */
}
churchianity

churchianity commented on Dec 25, 2022

@churchianity

I opened this: https://bugzilla.mozilla.org/show_bug.cgi?id=1807490

And was directed here - what's the status of the various unimplemented pdf parameters in pdf.js?

vitaly-zdanevich

vitaly-zdanevich commented on Nov 20, 2024

@vitaly-zdanevich

/display: none !important; / hide PDF viewer toolbar / opacity: 0.5 !important;

Thanks, but strange that display: none and opecity: ... in one block?

kekkc

kekkc commented on Nov 20, 2024

@kekkc

Thanks, but strange that display: none and opecity: ... in one block?

Corrected, just seen that the * were not displayed. Learned now that one can use triple ``` to insert code in comments that includes new line characters ;)

vitaly-zdanevich

vitaly-zdanevich commented on Nov 21, 2024

@vitaly-zdanevich

Improved - to reveal the UI on mouse hover:

/* https://github.com/mozilla/pdf.js/issues/2784#issuecomment-366480669 */
#outerContainer #mainContainer div.toolbar {
	opacity: 0;
}
#outerContainer #mainContainer div.toolbar:hover {
	opacity: 1;
}

#outerContainer #mainContainer #viewerContainer {
	top: 0 !important; /* move doc up into empty bar space */
}

#viewerContainer {
	overflow-x: hidden !important;
}
kekkc

kekkc commented on Mar 12, 2025

@kekkc

@vitaly-zdanevich
almost missed this, pretty cool ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @jviereck@yurydelendik@Snuffleupagus@vitaly-zdanevich@kekkc

      Issue actions

        Implement parameter navpanes and toolbar · Issue #2784 · mozilla/pdf.js