為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

I can't stop Mozilla from asking me how I'd like to handle pdf documents

  • 10 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 cor-el

more options

I am trying to make Mozilla Firefox open all pdfs from Firefox in Adobe without prompting the users about whether they want to save or open. I have Adobe Reader set as the default app for pdf files, and I've disabled pdfjs in Group Policy both for the user and the computer side. I just can't seem to stop that prompt from popping up. Any ideas? I don't want to have to set the application handler manually for 1500+ computers. Thanks!

I am trying to make Mozilla Firefox open all pdfs from Firefox in Adobe without prompting the users about whether they want to save or open. I have Adobe Reader set as the default app for pdf files, and I've disabled pdfjs in Group Policy both for the user and the computer side. I just can't seem to stop that prompt from popping up. Any ideas? I don't want to have to set the application handler manually for 1500+ computers. Thanks!
附加的畫面擷圖

所有回覆 (10)

more options

Hey, Have you tried going to Options>>General then navigate to 'Applications'. Now for 'PDF' recheck that Adobe Reader is set as default.

more options

If you need to set up a specific download handler for your enterprise, check the Policy option:

That doesn't always work because servers may not send the official Content-Type ("application/pdf") with the file. But the workaround for that is too complicated to install on 1500 computers...

more options

I did confirm that Adobe Reader is my default application for pdfs, thanks. I've also tried using the ADMX template (and disabling the pdfjs)--no luck. As to the handlers option, please forgive my ignorance, but could you possibly clarify how those options are actually deployed as registry keys? They look like portions of the handlers.json file, but I don't know how to create them as registry keys. Any help would be most appreciated. I've been tearing my hair out trying to make this go! Thanks!

more options

I don't know the mechanics of how Firefox uses Policy settings to update or override handlers.json entries. Hopefully someone can answer that for you.

more options

https://github.com/mozilla/policy-templates/blob/master/README.md#handlers

Has an example of how to set the Handler via ADMX.

It's some JSON you can add in the Handlers section.

more options

I enabled the "Handlers" setting in the Firefox ADMX file and then pasted this into the "Options" area, but it didn't stop Firefox from prompting to either save or open in Adobe Reader:

{

 "mimeTypes": {
   "application/msword": {
     "action": "useSystemDefault",
     "ask": true | false
   }
 },
 "schemes": {
   "mailto": {
     "action": "useHelperApp",
     "ask": true | false,
     "handlers": [{
       "name": "Gmail",
       "uriTemplate": "https://mail.google.com/mail/?extsrc=mailto&url=%s"
     }]
   }
 },
 "extensions": {
   "pdf": {
     "action": "useHelperApp",
     "ask": "false",
     "handlers": [{
       "name": "Adobe Acrobat",
       "path": "C:\\Program Files (x86)\\Adobe\\Reader 11.0\\Reader\\AcroRd32.exe"
     }]
   }
 }

}

more options

Hi hafenjodi, your reply was routed to the spam link moderation queue but it should appear here eventually.

How are you accessing the PDFs -- from a web server or from disk?

If the PDFs are being served by a web server, Firefox may ignore the instructions in handlers.json under certain circumstances based on the HTTP headers. These are the ones I'm most familiar with:

  • Content-Disposition: attachment => as far as I know, Firefox always shows the download dialog
  • Content-Type: (not application/pdf, and not application/octet-stream with a .pdf file extension) => Firefox doesn't treat the download as a PDF
more options

Thanks for your reply, jscher2000. I'm accessing the pdf files from a web server (example, pdf links from this website: https://www.learningcontainer.com/sample-pdf-files-for-testing/). It does have a different content-type, but once I select "Open with Adobe Reader" and check the "always" box, it remembers it for the next time--leading me to think there's got to be SOME way to essentially check those boxes with Group Policy without touching every PC, right?

more options

All three of those follow a similar pattern that triggers the download dialog:

https://www.learningcontainer.com/download/sample-pdf-file-for-testing/?wpdmdl=1566&refresh=6046ac5c4e80e1615244380

  • content-disposition: attachment;filename="sample-pdf-file.pdf"
  • content-type: application/pdf

I believe some sites do this without thinking much about it, while others do it to prevent viewing the PDF in a tab. Either way, Firefox doesn't have a built-in feature to override it, and I don't know whether you want to consider an extension for that or just let users interact with the dialog.

more options

Note that you need to choose either true or false in: "ask": true | false,

  • "ask": true,
  • "ask": false,