![](/img/trans.png)
[英]How to hide toolbar coming with pdf file when trying to render by using iframe in firefox?
[英]Hide pdf toolbar in firefox while displaying pdf using iframe
我正在使用 iframe 在瀏覽器中顯示 pdf 文件。 它工作正常,但我想禁用/隱藏 acrobat 工具欄(下圖)。
我嘗試了#toolbar=0&statusbar=0
解決方案,它在 chrome 上運行良好,但在 Firefox 上不起作用。 我怎樣才能做到這一點?
對於任何搜索,有一個答案在這里https://support.mozilla.org/en-US/questions/1119523從用戶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 */
}
瀏覽器以不同的方式處理 PDF 打開參數(如果有的話)。 如果瀏覽器供應商沒有為其構建 API,則 Javascript 不可能強制瀏覽器支持 PDF 打開參數。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.