Player PDF for Default

Post Reply
guigui69
Posts:2
Joined:Sat Mar 14, 2015 7:46 am
Player PDF for Default

Post by guigui69 » Sat Mar 14, 2015 7:59 am

Hello,

I use your version of Firefox (EC) on my Citrix servers.

I wonder if there is an adjustment to do (admx?) To default pdf file opens with the player Adobre pdf reader and not with firefox reader (pdfviewer.js)?

'(Sorry don't speak english)

guigui69

Loktai
Posts:6
Joined:Thu Apr 02, 2015 7:27 am

Re: Player PDF for Default

Post by Loktai » Thu Apr 02, 2015 7:53 am

Hello,

I have recently been looking into how to do the same thing myself and this is what I came up with:

1. Browse to about:config in Frontmotion and accept the warning
2. Right click on the options and select new | String
3. Name= plugin.disable_full_page_plugin_for_types (case sensitive)
4. Value = application/pdf

This will set the default pdf reader to the external Adobe Reader and not the builtin reader (Provided you have it installed)

Automatic Deployment Via GPO (Untested)

By default if you load the adm/admx file into GPO this setting is currently not there. You will need to manually edit the adm/admx file to add this.

Note I have never attempted this myself, nor have I tested this solution - I do not recommend implementing the below on a production server. Please test it first!!!!!!!!!! (Can't stress this enough)

Insert the relevant code below into the mozilla.adm or mozilla.admx file that you are using. (Again I have never tried this so double check my formatting is correct and don't blindly copy and paste expecting it to work!)

ADM Version:

POLICY "plugin.disable_full_page_plugin_for_types"
EXPLAIN !!Sets Default Program for File Types
PART "plugin.disable_full_page_plugin_for_types" EDITTEXT
VALUENAME "application/pdf"
END PART
END POLICY

ADMX Version:

<policy name="PLUGIN_DISABLE_FULL_PAGE_FOR_TYPES" class="Machine" displayName="$(string.PLUGIN_DISABLE_FULL_PAGE_FOR_TYPES)" explainText="$(string.PLUGIN_DISABLE_FULL_PAGE_FOR_TYPES)" presentation="$(presentation.PLUGIN_DISABLE_FULL_PAGE_FOR_TYPES)" key="Software\Policies\Mozilla\lockPref">
<parentCategory ref="PLUGIN_CATEGORY" />
<supportedOn ref="windows:SUPPORTED_ProductOnly" />
<elements><text id="PLUGIN_DISABLE_FULL_PAGE_FOR_TYPES" valueName="plugin.disable_full_page_plugin_for_types" /></elements>

---------

Go into the GPO and configure the setting plugin.disable_full_page_plugin_for_types to the value of application/pdf (I think the ADM code will do that automatically, please check).

Test and see if it works.

I hope this helps

I hope this helps some people!

orwigc
Posts:6
Joined:Mon Oct 27, 2014 9:45 am

Re: Player PDF for Default

Post by orwigc » Thu Apr 02, 2015 1:47 pm

You can try setting a registry setting under Preferences in Group Policy to set things that are not a part of the ADM/ADMX settings.

For setting the java plugin state:

Preferences
General
Action Replace
Properties
Hive HKEY_LOCAL_MACHINE
Key path SOFTWARE\Policies\Mozilla\lockPref
Value name plugin.state.java
Value type REG_DWORD
Value data 0x2 (2)

This seems to work, but it's been a while since I tested it and cannot guarantee it as a solution.

orwigc
Posts:6
Joined:Mon Oct 27, 2014 9:45 am

Re: Player PDF for Default

Post by orwigc » Thu Apr 02, 2015 1:49 pm

Forgot to add that this method, assuming that it works, sidesteps the ADM/ADMX constraints so you don't need to edit them to put this stuff in.

Loktai
Posts:6
Joined:Thu Apr 02, 2015 7:27 am

Re: Player PDF for Default

Post by Loktai » Fri Apr 10, 2015 2:17 am

I have done some further testing with setting the PDF to automatically open with Adobe reader instead of the plugin.

In my previous post I identified the setting that does this, however on further testing I found that setting the option to 'save to disk' uses the exact same setting. So if the user manually sets it to save to disk at any point, it will no longer use adobe, and there is no way to set it back to use Adobe in the background. It has to be reset to adobe manually.

Even if you reset the setting in about:config so it is no longer present, and then re-add it again, it will remember what the last setting was and stick with that one.

Example:

1. GPO sets builtin pdf reader to disabled. Adobe is now the default option to open PDF files.
2. The user accidentally sets pdf to 'save to disk' instead.
3. Admin comes along and resets all user settings so and runs a gpupdate to reload the GPO Settings
4. GPO sets builtin pdf reader to disabled. 'Save to disk' is still the default option because that was the last setting the user had.

Even if the option is hard set in the registry, the user can still change between Adobe reader and 'Save to Disk'

I have looked through every option in about:config to see if there is a way to stop the user from doing this (you just know that someone will at some point) and breaking the configuration you carefully set.

Very frustrating.

Loktai
Posts:6
Joined:Thu Apr 02, 2015 7:27 am

Re: Player PDF for Default

Post by Loktai » Fri Apr 10, 2015 7:19 am

Update: I have done some further work and think I have come up with a worksable solution that sets the correct setting and also prevents the user from overriding it (easily). This is for disabling the build in PDF viewer and forcing the user to use the Adobe reader.

1. Create a userChrome.css file in your installation package in order to lock down the FrontMotion user interface and stop unwanted tinkering.
1.1. In your Front Motion Package create a file in \browser\defaults\profile\chrome called userChrome.css - This will create a customized user interface by default for your users.
1.2. Inside this file start with this code at the top:
@namespace url("http://www.mozilla.org/keymaster/gateke ... s.only.xul"); /* set default namespace to XUL */
1.3. Add one of the following lines depending on what you want to acheive:
1.3.1. To disable ONLY the options button (the icon on the menu which is a gear) in FrontMotion use: #preferences-button { display: none !important; }
1.3.2 .To disable the full menu button (the icon with 3 lines in the top right) use: #PanelUI-menu-button { display: none !important; }

-----------------------------------------------
These steps will stop the user easily getting into the options and setting the PDF action to 'save to disk', the first option I gave will still give them access to the print button, search, addons etc. The second removes the entire menu.

N.B it is still possible to get into the settings by right clicking the top of the browser and selecting Menu Bar. This will restore the old style File, Edit menu along the top of the browser. This can also be disabled in the userChrome.css if required, I opted to leave it as an option as it gives admins a way in to change things, but would take a reasonable level of knowledge and a determined effort to circumvent security by the end user to get there.
-----------------------------------------------

2. Use either of the methods listed earlier in this threat to set plugin.disable_full_page_plugin_for_types to application/pdf (either by modifying the group policy template to allow it, or by adding the registry key - both of which work.

3. Do a test deployment of your new package with customized css, and this should now set the pdf reader to adobe, and stop the user from easily chaging the settings and otherwise breaking things. You can find the .css file in the user profile in Windows 7 and later in the \Users\%username%\AppData\Roaming\Mozilla\Firefox\Profiles\random profile name\chrome folder to check that the settings have taken effect.

This has been tested with a brand new user on a test system and worked perfectly, however I am not sure how it will work with users that previously had a firefox profile. It may be worth running a GPO script to clean up old profiles from users, and then allow firefox to create a new profile with the new settings. Further investigation is required there.

Please let me know if you get stuck and I will see what I can do to help.

guigui69
Posts:2
Joined:Sat Mar 14, 2015 7:46 am

Re: Player PDF for Default

Post by guigui69 » Wed Dec 23, 2015 8:18 am

Hello,
thank you for your answers.
I did'nt understand everything :)

must I use the "preference" of our active directory
[HKEY_CURRENT_USER \ Software \ Policies \ Mozilla \ lockPref]
or
[HKEY_CURRENT_USER \ Software \ Policies \ Mozilla \ defaultpref]

plugin.disable_full_page_plugin_for_types

I must put what value? empty ? application / pdf?

Once this is implemented, it will directly open PDF in firefox with adobe reader or not?
Because on the other website, he tells me about the order pdfjs.disabled

Sorry don't speak english

Post Reply