Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted
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??
Posted
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

Posted

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

Posted
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

Posted

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

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...