Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

I need to force Firefox to open documents in external pdf viewer on all computers in my company.

more options

Hi. I'm obligated to force firefox to open pdf files downloaded from web to open externally in foxit reader. As far as i've researched there is no option to set it in user.js in all local profiles of firefox (I've just tried to set pdfjs.disabled to true - but this ended file to download rather than open in foxit). Computers are in Windows AD domain (about 500). We have different versions of firefox across computers (mainly esr versions from 50 to 60). Is there any way to set firefox pref to open in external pdf viewer in all computers in this situation?

Hi. I'm obligated to force firefox to open pdf files downloaded from web to open externally in foxit reader. As far as i've researched there is no option to set it in user.js in all local profiles of firefox (I've just tried to set pdfjs.disabled to true - but this ended file to download rather than open in foxit). Computers are in Windows AD domain (about 500). We have different versions of firefox across computers (mainly esr versions from 50 to 60). Is there any way to set firefox pref to open in external pdf viewer in all computers in this situation?

All Replies (7)

more options
more options

I've changed DisableBuiltinPDFViewer to enabled however it just gave me an result of saving pdf file. Is there an option to set it to open with foxit reader or any other pdf viewer. I also need to set .rtf documents to open in specific program is there such an option to set via gpo??

more options

That sounds like a IT issue where file associations aren't linking to the correct software to open the file in questions. So you should talk to your IT department about because I doubt the user has access to make such changes.

Modified by WestEnd

more options

krzmuc said

I've changed DisableBuiltinPDFViewer to enabled however it just gave me an result of saving pdf file.

Hmm, I would have expected the default behavior to be to show the Download (Open/Save/Cancel) dialog. However, if you go into about:config and set

pdfjs.disabled => true

without first going to the Applications section of the Options page and changing the PDF action from

Preview in Firefox

to

Always ask

then Firefox changes the handling to Save File with no entry on the Options page to fix it after the fact.

Puzzling. (This is in Firefox 63.)

more options

Could you take a look at this bug in the tracking system:

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

Although the Portable Document Format (PDF) setting is removed from the Options page, Firefox should shows a new one based on your default PDF handling app. However, it starts off in a strange state with a Plugin icon shown and, apparently, not having a valid behavior so it falls back to saving the file.

more options

So. Is there a way to set default handling of files on computers in corporate environment? I've read about changing values in mime and handlers.json however i couldn't find a solution of my problem. Is it possible to tell all firefoxes to use one profile e.g. from network share.

more options

Hopefully they will provide the support so that Group Policy, et al, will get the desired behavior (automatically open in the user/system defined PDF viewer). In the meanwhile, use Group Policy to create the two files: <Firefox-install-folder>\defaults\pref\autoconfig.js: pref("general.config.filename", "firefox.cfg"); pref("general.config.obscure_value", 0); pref("general.config.sandbox_enabled", false); <Firefox-install-folder>\firefox.cfg: // Can't use this line var observer = {

   observe: function observe(aSubject, aTopic, aData) {

// Use external viewer for PDF const CONTENT_TYPE = 'application/pdf'; const TYPE_EXTENSION = 'pdf'; var handlerService = Components.classes['@mozilla.org/uriloader/handler-service;1'].getService(Components.interfaces.nsIHandlerService); var mimeService = Components.classes['@mozilla.org/mime;1'].getService(Components.interfaces.nsIMIMEService); var handlerInfo = mimeService.getFromTypeAndExtension(CONTENT_TYPE, TYPE_EXTENSION); handlerInfo.alwaysAskBeforeHandling = false; handlerInfo.preferredAction = Components.interfaces.nsIHandlerInfo.useSystemDefault; handlerService.store(handlerInfo);

   }

} Components.utils.import("resource://gre/modules/Services.jsm"); Components.utils.import("resource://gre/modules/NetUtil.jsm"); Services.obs.addObserver(observer, "profile-after-change", false);