inm logo
Corporate Website | Contact | Store | Support | Login  

View categorized listing of all common frequently asked questions.
View our categorized library of downloads for all necessary manuals, software, etc.
 Article Options
Support Center » Knowledgebase » INM PDF Xtra for Authorware » How to detect the version of Acrobat / Reader installed
Support Page Banner
 How to detect the version of Acrobat / Reader installed
PDF Xtra for Authorware Windows, Macintosh Code Sample 7.x


Due to the differences in the way Acrobat and Reader behave from one version to another, it is sometimes desirable for an Authorware piece to detect which version the user has installed and then take appropriate action.For instance, if there is no Acrobat or Reader installed or the version is too old, the piece could alert the user to go to the appropriate URL and download the most recent version, or a version of Reader can be run from CD.


The global method PDF_AcrobatInfo() returns a list of property lists containing the name, version number and path, for all Adobe Acrobat or Reader applications installed on the user's computer (and the Preview application on Mac OS X).

You can then check for a specific version of Adobe Acrobat or Reader and launch the installed application from that path, or take another action if the appropriate application is not in the list.


--This code checks to see if a valid version of Adobe Reader or Acrobat is intalled
-- and then branches to the appropriate icon in the flowline.

AcrobatInfo := PDF_AcrobatInfo()
-- returned list looks like this:
-- [[#appname: "Acrobat", #version: "7.0", #path: "C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe"]]

Done := FALSE
OK_TO_Display_PDF := FALSE
i := 1
NumItems := ListCount(AcrobatInfo)
repeat while (Done <> TRUE) & (i <= NumItems)
     Item := ValueAtIndex(AcrobatInfo, i)
     app:= ValueAtIndex(Item, 1)
     if (app = "Reader") | (app = "Acrobat") then
          appver := ValueAtIndex(Item, 2)
          ver := SubStr(appver, 1,1)
               if (ver = "5") | (ver = "6") | (ver = "7") then
               -- prevent false positives by checking the path
               appPath := ValueAtIndex(Item, 3)
               if appPath <> "" then
                    OK_To_Display_PDF := TRUE
                    Done := TRUE -- exit loop and launch the version
                end if
          end if
     end if
     i := i + 1
end repeat
if (OK_To_Display_PDF = TRUE) then
     Goto (IconID(@"LaunchViewer") -- launch the version found
     -- warn the user to install Reader
   Goto (IconID(@"InstallReader")
end if


Article Details
Article ID: 77
Created On: 26 Sep 2006 12:03 PM

 This answer was helpful  This answer was not helpful

inm general footer
Services Xtras Go Products Support Gallery Store Download About Us Contact Newsroom