lidds Posted April 4, 2005 Posted April 4, 2005 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 Quote
stustarz Posted April 4, 2005 Posted April 4, 2005 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. Quote Visit: VBSourceSeek - The VB.NET sourcecode library "A mere friend will agree with you, but a real friend will argue."
lidds Posted April 4, 2005 Author Posted April 4, 2005 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?? Quote
kejpa Posted April 4, 2005 Posted April 4, 2005 Have just found another post on this site about using the pdf.ocx within applications' date=' does anyone know is there are any legal implications in including this within my commercial application??[/quote'] We've 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 Quote
lidds Posted April 4, 2005 Author Posted April 4, 2005 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 Quote
kejpa Posted April 5, 2005 Posted April 5, 2005 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 ;) Also have you got an example of how to call up a webbrowser and getting it to display a certain file? I don't 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 Quote
lidds Posted April 5, 2005 Author Posted April 5, 2005 Thanks Kejpa, Will give that ago. Thanks for your help Simon Quote
SonicBoomAu Posted April 6, 2005 Posted April 6, 2005 Normally all I use is Process.Start("Acrobat.exe", strFilePath) 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. Try Process.Start("Acrobat.exe", strFilePath) Catch ex As Exception ' Display a message that Acrobat isn't installed or something else. End Try Quote Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -- Rick Cook, The Wizardry Compiled
Recommended Posts