Acrobat reader question...

lidds

Well-known member
Joined
Nov 9, 2004
Messages
210
Is there anyway that I can check to see if acrobat reader is installed on a machine and if it is, automatically lauch acrobat reader to diaplay a given file. If anyone can assist I am writing my app. in vb.net.

Thanks

Simon
 
Well my tip would be to check if the Adobe >> Acrobat Reader >> [Version] >> InstallPath registry key is there, this key can then be used to launch the application.
 
Have just found another post on this site about using the pdf.ocx within applications, does anyone know is there are any legal implications in including this within my commercial application??
 
lidds said:
Have just found another post on this site about using the pdf.ocx within applications, does anyone know is there are any legal implications in including this within my commercial application??
Weve had strange behaviour using the ocx. The application used more and more memory for no obvious reason. We changed from using the ocx to use a webpage for showing the pdf and it works very well.

HTH
/Kejpa
 
Thanks for your help much appreshiated, will go down that route then. Just out of interest do you check to see if acrobat reader is installed? if so have you got an example of code that does this (vb.net if possible)? Also have you got an example of how to call up a webbrowser and getting it to display a certain file?

Thanks for the help

Simon
 
lidds said:
Just out of interest do you check to see if acrobat reader is installed?
We manage the computers ourselves and install Acrobat before shipping them ;)

lidds said:
Also have you got an example of how to call up a webbrowser and getting it to display a certain file?
I dont call up the webbrowser, I use the webbrowser control on a form and use the webbrowser controls "Navigate" method to load the pdf.
Really very simple.

HTH
/Kejpa
 
Normally all I use is
[VB]
Process.Start("Acrobat.exe", strFilePath)
[/VB]

Where strFilePath is the location of the pdf file. I.E. C:\temp\document.pdf

Instead of seeing if Adobe Acrobat exists just place the Process.Start statement within a Try - Catch - Finally.

I.E.
[VB]
Try
Process.Start("Acrobat.exe", strFilePath)

Catch ex As Exception
Display a message that Acrobat isnt installed or something else.
End Try
[/VB]
 
Back
Top