7 Replies Latest reply on Feb 5, 2014 2:08 AM by try67

    Adobe Reader Browser Plugin - How to disable right click print

    willhignettcs

      Here is some background to my question

       

      I'm using Adobe Reader 9.2 and have configured to use the Adobe Reader Active X browser plugin.

      which has the effect of launching pdf's within the IE browser rather than launching the full client. This is all working fine

       

      I have a requirement that I need to lockdown certain menu items (for the purpose of this example, lets say "SaveAs" and "Print") and toolbars which I have also done successfully using folder level javascripts. For example I have created a HideMenuItems.js file and placed this in the "C:\Program Files\Adobe\Reader 9.0\Reader\Javascripts", here is a snippet of the file which relate to hiding / removing the SaveAs and Print items

       

      app.hideToolbarButton("Print"); 

      app.hideToolbarButton("SaveFileAs");

      app.hideToolbarButton("Save");

       

      These work fine and hide the Print and Save toolbar buttons from the Adobe Reader Browser plugin menu.

       

      As an aside If I wanted to hide the same icons from the full adobe reader client I could use app.hideMenuItem("Print");

       

      So this all works fine and I'm happy so far. Now, with these settings in place I launch the pdf within the browser, although save and print buttons are now hidden and I cannot add them back, I can still RightClick anywhere in the pdf and get the context menu, from there I can select print.

       

      What I'm after is a way to either

       

      (i) Selectively remove menu items from the right click context menu, and therefore remove the print option e.g something like app.[hideRightClickMenuItem]("Print") would be great but I dont know what that method is called.

      or

      (ii) Disable the RightClick context menu altogether for Adobe Reader Browser Plugin

       

      Not bothered what the solution is whether its a reg hack - HKCU / HKLM  / or javascript line I can add to my HideMenuItems.js, But basically I want to lock down the ability for the users to select print button from all sources including "CTRL + P",

       

      Or if this is not possible let them hit CTRL P or right click print, but then not display the Adobe Print Dialog.

       

      Basically the printing of the documents in handled by our web app sending a silent print to the adobe application which again works fine, I just need to prevent the users from being able to initiate a print from within the pdf when displaying the pdf in a browser.

       

      Having searched around there is an API called AVAppRegisterForPageViewRightClicks which is supposed to prevent right clicks, But I dont know how to use this, or whether it can be used within my HideMenuItems.js file, tried many different syntaxes but to no avail.

       

      Does anyone have any experience in this? Adobe - do you have any suggestions ?

       

      Cheers

       

      Will

        • 1. Re: Adobe Reader Browser Plugin - How to disable right click print
          Bernd Alheit Adobe Community Professional & MVP
          Having searched around there is an API called AVAppRegisterForPageViewRightClicks which is supposed to prevent right clicks, But I dont know how to use this, or whether it can be used within my HideMenuItems.js file, tried many different syntaxes but to no avail.

          This API is available in Adobe Reader and Adobe Acrobat plugins.

          • 2. Re: Adobe Reader Browser Plugin - How to disable right click print
            willhignettcs Level 1

            Hi thanks for your response, yes it seems this API is availalbe but there are no examples of how to use it. You mentioned its available in Adobe reader and Adobe Acrobat plugins. Well I'm using the Adobe Reader Active X Browser Plugin so how would I use this API to restrict the Browser plugin.l

             

            I am not a developer writing my own custom plugins, I simply want to use the out of the box adobe reader product, specifically the Active X browser plugin, but I need to be able to customise and restrict what the user is able to do.

             

            The reason I need to do this is that we publish IE on a citrix server which users access to launch this highly secure web based application. The sensitive data that they view is in the forms of PDFs which are viewed by the Adobe reader browser plugin within the browser. The web application controls who can save, export, print etc, so I need to be able to lock down the Adobe Reader Active X browser plugin so that the user cannot initiate save, and print functionality from within the viewed pdf. I've done this successfully by restricting the menu and toolbar items but it is still possible to right click on the viewed pdf and click select print from the context menu. This would cause us a big security flaw, which would result in users that are only supposed to view being able to click print.

            I published a desktop (locked down) and published IE (locked down) all successfully with GPOs so the users cannot do anything they are not supposed to do, however Adobe reader it seems cannot be easily locked down and this is a problem as I might have to start looking at viable alterantives. Surely a simple requirement as this could be acheieved with relative ease.

             

             

            In an ideal world there would be an  available GPO template (.ADM file), which could be used to centrally manage these type of settings. I dont even mind writing an ADM myself, I've written many before, but for example what I need is the appropriate registry entries and how they are used to lock down / restrict certain functions so that I can write such an .ADM file.

             

            I dont mind how I achieve this, I just need a way to do it. So if using the API AVAppRegisterForPageViewRightClicks would achieve this, can someone please tell me how I can implement something that would use this API to restrict the right Click Print options for example.

             

            The sort of answer I;m looking for would be

             

            Create a file, paste in this code, place the file is this location xxxxx, this is a per machine fix so will affect all users

            or

            Edit the regstry and make this HKCU change xxxxx - This is obviously a per user fix so use normal methods to get this into every users profile.

            or

            Open up the file in this location xxxxxx and add AVAppRegisterForPageViewRightClicks = AlwaysDisable (or whatever the syntax is)

             

            Thanks for you help

             

            Cheers

             

            Will

            • 3. Re: Adobe Reader Browser Plugin - How to disable right click print
              Bernd Alheit Adobe Community Professional & MVP

              Hi thanks for your response, yes it seems this API is availalbe but there are no examples of how to use it. You mentioned its available in Adobe reader and Adobe Acrobat plugins. Well I'm using the Adobe Reader Active X Browser Plugin so how would I use this API to restrict the Browser plugin.

              You can use the API in plugins for Adobe Reader or Adobe Acrobat. You can more information about development of plugins in the Acrobat SDK.

              • 4. Re: Adobe Reader Browser Plugin - How to disable right click print
                willhignettcs Level 1

                so how would i do this for the Adobe Reader Browser plugin for example?

                 

                Please explain...

                • 5. Re: Adobe Reader Browser Plugin - How to disable right click print
                  Bernd Alheit Adobe Community Professional & MVP

                  You can find samples for plugins in the Acrobat SDK.

                  • 6. Re: Adobe Reader Browser Plugin - How to disable right click print
                    mady14

                    Hi thanks for your solution,

                    But i have a problem in folder script level my java script is not debugging and there  is no changes in output pdf.colud you please brief explanation for how to compile my script.other wise please send me to mymail those details. friends.madhav24@gmail.com .

                    I already disabled print button using some other software.

                     

                     

                    I tried two types of code

                     

                    1.

                    // [File - Create Adobe PDF Using Acrobat.com], plus toolbar button

                    app.hideMenuItem("WebServices:CreatePDF");

                    app.hideToolbarButton("Weblink:CreatePDF");

                     

                    // [File - Collaborate], plus toolbar button

                    app.hideMenuItem("Annots:FileCollaboration");

                    app.hideToolbarButton("Annots:CollabToolButton");

                     

                    app.hideToolbarButton("CommentTask");

                    app.hideToolbarButton("SigTaskButton");

                    2.

                    app.hideToolbarButton("Print");

                    app.hideToolbarButton("SaveFileAs");

                    app.hideToolbarButton("Save");

                    • 7. Re: Adobe Reader Browser Plugin - How to disable right click print
                      try67 MVP & Adobe Community Professional

                      This is a very bad way of trying to prevent someone from printing your file... They can easily overcome it by disabling JS or even just by pressing Ctrl+P, which would still open the Print dialog.

                       

                      If you want to restrict printing, as well as other functionalities, use a security policy. It's not 100% secure either, but it's a much better way than what you're trying to do with this code...