2 Replies Latest reply on Dec 29, 2008 10:53 AM by jdamrell-pc5CZl

    Need help pinging a server

      I'm not sure how to start this but here's my project:

      I need to create a script for turning off print permission based on a negative ping response to a server's IP address. In a nutshell, these are locally stored downtime PDF forms that aren't to be used unless connectivity to our server is lost. I want to verify that connectivity is lost before allowing printing from Acrobat reader.

      I'm new to PDF scripting... How do I start?
        • 1. Re: Need help pinging a server
          What you're trying to do is not really viable. The Acrobat/Reader Javascript API includes networking via the Net and Net.HTTP objects, but when you're talking about JS restricting printouts you're stuck - the document JS engine has no access to the security handler, so can't enable/disable the print option on a secured document, nor for that matter secure one in the first place.

          Also, if the logic of your system is "no connection = access to the form" then the user will also get access by disabling javascript, or denying it at the 'allow network access?' security warning popup, or anything else that interferes with their copy of Reader or Acrobat networking.

          The best you can realistically do is throw up a warning message of your own *asking* they don't use the form unless the server is active. You can attempt to show them if it is or not, but the answer won't be reliable enough to offer 'security'.
          • 2. Re: Need help pinging a server
            jdamrell-pc5CZl Level 1
            Thanks for responding David. It is unlikely that our form users would disable JavaScript to get around a script (little time or familiarity with these settings) It is an acceptable risk at this point. To your second point -- if I believed that asking the form users to use the correct version of the form could be effective, I certainly wouldn't be wading into this somewhat unfamiliar territory. The issue is that these people are in a very hectic environment and will tend to take the path of least resistance to get the job done. It's not a character judgment, merely a function of the work load.

            Back to the technical stuff:
            Since I've read elsewhere that JavaScript can't be used to ping, what about the possibility of using WSDL? I'm spit balling here.