5 Replies Latest reply on Dec 10, 2014 2:51 PM by try67

    Look for a value in a specific PDF

    MatLac Level 1

      Is there a way to access the value of a field of a specific PDF from outside of it, when not active.  What I'm trying to achive is a version check at opening.  We have the form on a dedicated server and it gets updated once in a while without the users knowledge except for the value of a certain field which contains the version number of the form.

       

      Upon opening, I would like to go look for the version of the form on the server to see if the user as "the latest version" and alert him if not.

        • 1. Re: Look for a value in a specific PDF
          try67 MVP & Adobe Community Professional

          So when a PDF file is opened you want to load another file in the background and check the version number in one of its fields? And you want that file to be hidden? In principle there is an option to open a file in Acrobat hidden, but it doesn't seem to work correctly. At any rate it requires a script to be installed on the user's local machine.

          • 2. Re: Look for a value in a specific PDF
            MatLac Level 1

            Not exactly.  The form is located in a read only dedicated server accessible by local users from within the companie.  Althought we urge our user to use the form from our servers by creating a Shortcut on their local desktop pointing to the original file, some of them less familiar with computers have tendencies to use a COPY of the original file instead of a SHORTCUT.  The problem with this is they do not benefit from the latest version of the form as I modify it from time to time on the server.  So when they contact me with any problem or bug they encounter, the first thing I do is check the value of a hidden text field I placed in the bottom corner named "VERSION" that hold the version number I change every time I make a new release to see if they used an obsolete version.

             

            What I imagined is the following.  From now on, I would place a script at doc open that does the following:

            var myVersion = this.getField("VERSION").value;

            var latestVersion = Something to check the value of the field named "VERSION" in the form located on the server;

            if (myVersion != latestVersion){

                 app.alert("obsolete..blah, blah, blah");

            }

             

            Maybe there is a better approach to what is basically a version checker at doc open.  Users will be using Reader and I have access to users local machines and folders.

            • 3. Re: Look for a value in a specific PDF
              try67 MVP & Adobe Community Professional

              I've actually developed a tool that does something like that for PDF files,

              but there are a lot of problems in getting it to run smoothly. From my

              experience it never properly. You're better off using a date-based check.

              Define X amount of time after which the user should check if there's a new

              version and inform them of it when that time passes.

              • 4. Re: Look for a value in a specific PDF
                MatLac Level 1

                Not a bad idea.  Since I have quite a lot of forms with the same issue, how about I create a folder level script of the kind:

                 

                versionCheck(date, creationDate)

                 

                where date will be new Date() and creationDate will be this.info.CreationDate ?

                • 5. Re: Look for a value in a specific PDF
                  try67 MVP & Adobe Community Professional

                  Then you need to install it on the local computer of each user... A

                  doc-level script can do the same and doesn't require any installation.