Skip to main content
Alliosaaa
Inspiring
March 20, 2019
Question

Stop User from Working in Browser?

  • March 20, 2019
  • 1 reply
  • 736 views

Hi there,

This may not be the correct forum to ask this question, but I figured I'd start here first...

More and more, I am running into problems with employees who do not understand the difference between opening a PDF in Adobe Reader, vs. opening a PDF in their browser. I have given tutorial after tutorial on how to avoid this, but it never seems to stick. I'm constantly getting phone calls saying "my formula won't work" or "when I click the button nothing happens", and it's ALWAYS because the user didn't properly download the file.

I'm hoping that there might be a script to prevent the user from doing anything to a document if it's open in say, Google Chrome vs. Adobe Reader. Or perhaps, have the document just be one page with a button that says "START", that you can only click if it's open in Adobe.

Any thoughts?

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
March 20, 2019

This is currently a major issue for many of us. Unfortunately, there's not much that can be done about it.

The best solution I've been able to come up with is to place a very large, very visible warning on the first page of the file and then use a script to hide it when it is opened in Adobe Acrobat or Reader. If it is opened in another application (even if it doesn't support scripts) the warning will remain visible and the user will have at least some kind of indication that something is wrong.

Alliosaaa
AlliosaaaAuthor
Inspiring
March 20, 2019

Thanks so much - that's along the lines of what I was thinking. If I can't stop them completely, that would at least make them stop and think for a second.

I found this script in the SDK Documentation - is this the approach you'd recommend?

if ( this.external )

   {

     //Viewing from a browser

   }

   else

   {

     //Viewing in the Acrobat application.

   }

try67
Community Expert
Community Expert
March 20, 2019

No, I would do it like this:

if (/Reader/.test(app.viewerType) || /Exchange/.test(app.viewerType)) this.getField("WarningCover").display = display.visible;

The "WarningCover" field should be an opaque, read-only field (maybe a button) placed above a static warning text and made hidden. The code will make it visible when you open the file in Acrobat or Reader, thereby covering the warning.