Link to home
Start Free TrialLog in
Avatar of Otana
Otana

asked on

How to detect if client has Acrobat Reader from aspx file?

Hi all,

I have an aspx page, from which I would like to detect if the client has Acrobat Reader installed, and which version. How can I do this?

Also, if Acrobat Reader has been detected, and the PDF file is opened in the browser, is there a way for me to choose which Acrobat Reader toolbars are shown?

Thanks.
Avatar of AerosSaga
AerosSaga

You will have to use javascript:

property pDefaultDocDir

on new (me)  
   pDefaultDocDir = "Files"
 return me    
end  

on OpenFile me , p_FileType , p_Dir , p_FileName
 set FileToOpen = the moviePath & pDefaultDocDir  & "\" &  p_Dir & "\" & p_FileName  
 -- Open the FileType
 if (p_FileType = "PDF") then
   me.StartAcrobat ( FileToOpen )
 end if
end OpenFile

--Acrobat File opening
on StartAcrobat me, p_PDFFile  
  if ( baFileExists( p_PDFFile ) = 1 )  then -- check if file exists
   set AcroExe = baFindApp( "pdf" ) -- see if acrobat is installed
   if AcroExe <> "" then -- if they have acrobat and the file exists
     baOpenFile(  p_PDFFile , "Maximised" ) -- open the file
   else --
     alert("You do not have Adobe Acrobat installed")
   end if  
 end if
end StartAcrobat

http://www.sitepoint.com/article/flash-director-mx-2004/2

Regards,

Aeros
I believe the only way to specify which toolbars are available are from within the pdf file.
Avatar of Otana

ASKER

Isn't there a way to do it using C#? I'm trying to avoid miwing languages as much as possible.
ASKER CERTIFIED SOLUTION
Avatar of AerosSaga
AerosSaga

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial