Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide pdf toolbar in firefox while displaying pdf using iframe

I am displaying a pdf file in browser using iframe. It is working fine but i want to disable/hide acrobat toolbar(below image).

Toolbar in firefox

I tried the solution #toolbar=0&statusbar=0 it's working great on chrome but it's not working on Firefox. How can I achieve this?

like image 806
Sumit Kamboj Avatar asked Nov 09 '22 10:11

Sumit Kamboj


2 Answers

For anyone searching, there is an answer here https://support.mozilla.org/en-US/questions/1119523 from user jscher2000 (https://support.mozilla.org/en-US/user/jscher2000)

#outerContainer #mainContainer div.toolbar {
  display: none !important; /* hide PDF viewer toolbar */
}
#outerContainer #mainContainer #viewerContainer {
  top: 0 !important; /* move doc up into empty bar space */
}
like image 50
ckm Avatar answered Nov 14 '22 21:11

ckm


Browsers handle PDF Open Parameters differently (if at all). It is not possible with Javascript to force browsers to support PDF Open Parameters if the browser vendor did not build an API for it.

like image 35
Paul Trimor Avatar answered Nov 14 '22 23:11

Paul Trimor