Is there a way to programmatically configure Firefox to use Adobe Reader within the Firefox Browser?
We have customers who are having difficulty saving their PDF files upon opening them from our web page because most of the time, they have "Use Adobe Reader (default)" set under Tools->Options->Applications. This causes the PDF file to be loaded into a standalone version of Adobe Reader where the Save icon is disabled.
We can suggest to our users that they change this to "Use Adobe Acrobat (in Firefox)", which will give them the desired behavior of loading the PDF in a Firefox window with the Acrobat plug-in's Save icon enabled.
However, we'd like to pro-actively change this configuration for our users via javascript if at all possible, so they don't have to go through the trouble of contacting us with the issue.
Is this possible?
Toate răspunsurile (9)
Thanks, but the link you shared all contains information a user must do to set this up.
What I'm looking for is a way to make a configuration change to Firefox to use the Acrobat bat plug-in within the browser via javascript. Is that possible?
You can set the pdfjs.disabled pref to true on the about:config page to disable the build-in PDF viewer.
You can check the value of the plugin.disable_full_page_plugin_for_types pref on the about:config page and remove the application/pdf part if present or reset the pref to the default via the right-click context menu.
See also:
'cor-el the problem is that pdf documents contain interactive data/scripts/etc sometimes. This requires them to be opened in Adobe pdf viewer. But it's the worse case to force a client to open pref pane, bla-bla... Is there any obvious way, how to specify browser to open a particular document either with pdf.js, or with Adobe plugin (without additional user's input)? Any hash parameters?.. Thank you.
I have the same problem, but "the other way around". I need to configure programmatically FireFox to open PDFs in Adobe Reader by default. For other similar issues (as for example the default Start Page) we are deploying the file user.js inside the UserProfile folder. Detailed functionality of user.js file is documented here:
http://kb.mozillazine.org/User.js_file
Unfortunately adding the line
user_pref("pdfjs.disabled", true)
to that file doesn't solve the problem because then FF just doesn't open the PDF.
Doing some searching I came to the information that this kind of settings are stored in the file mimeTypes.rdf (again within the userprofile, thanks jscher2000). Trying to compare the file mimeTypes.rdf before and after changing the settings brings to a mess (not human readable I would say): 327 lines different that cannot be handled.
So my question would be: is there a way to override certain entries stored in mimeTypes.rdf in a way similar to the user.js file??
Modificat în
Hi freesbee98, the preferences for how to handle "downloads" are stored in mimeTypes.rdf in the individual user profile.
I think that the built-in PDF Viewer only gets triggered with a specific MIME type (application/pdf) send by the server.
Bug 845740 - The web site should be able to suggest that Firefox not to use the built-in PDF viewer
Hi freesbee98, mimeTypes.rdf looks like text soup, but it's an XML-based file, so you might be able to manipulate it using VBScript and the MSXML library. However, I haven't tried that myself or searched for any existing scripts, so I don't know whether it is sufficiently well formed to edit that way...
Edit: I assumed Windows, but if that's incorrect, there may be an equivalent on other platforms.
Modificat în
Yes it's windows, but once found the strategy it wouldn't be a big deal to apply that to other platforms.
mimeTypes.rdf looks relatively well formed to be edited even manually (Autodesk xmls are much much much more messy). Unfortunately I need to automate the procedure, and the effort to invest to solve this problem programmatically is a little bit too much. The bosses are IE fans, and they would immediately say "nuke FF, we can use IE".
This pdfjs was a real boomerang for Mozilla, even if I know how to change the behavior from GUI...
Modificat în