Help:(Immediate) Reading Pdf (acrobat reader) files from Visual Basic 
Author Message
 Help:(Immediate) Reading Pdf (acrobat reader) files from Visual Basic

Hi!

I have a User Manual in Acrobat reade (pdf) format.  How can I read the pdf file within  my Visual Basic application. I tried launching the acrobat reader using SHELL function, but that might be a problem when I distribute my VB application, cause I would not know the path, where the acrobat application might reside, it might be different for different computers.  SO, is there any other way to find out the path where the acrobat might be and then use the SHELL function to launch the application?

I would really appreciate it, if somebody could provide  me some
snippets of the code to do that....

I need it immediately....
Thank YOu...

Srinivas

-----------------** -- Posted from CodeGuru -- **-----------------
http://www.*-*-*.com/ ;       The website for VB programmers.



Mon, 24 Sep 2001 03:00:00 GMT  
 Help:(Immediate) Reading Pdf (acrobat reader) files from Visual Basic
You want to use the ShellExecute windows API function.  This function
launches a file with it's associated program as listed in the windows
registry.

Here is an example that launches an html file into a web browser:

    Dim ret as long

    ret = ShellExecute(MDIForm1.hwnd, "Open", "c:\test\test.html", "",
App.Path, 1)

Replace the MDIForm1 with your form's name.  Replace the c:\test\test.html
with your pdf filename.  App.path should be ok the way it is.  The number 1
indicates that the program should load maximized.

You will need to do some checking of the return value and handle it
accordingly.  This should get you on your way.

Look up ShellExecute in the MSDN on-line help, it will give you a more
detailed explanation.

Hope this helps.

Cheers
Rob

Quote:

>Hi!

>I have a User Manual in Acrobat reade (pdf) format.  How can I read the pdf

file within  my visual Basic application. I tried launching the acrobat
reader using SHELL function, but that might be a problem when I distribute
my VB application, cause I would not know the path, where the acrobat
application might reside, it might be different for different computers.
SO, is there any other way to find out the path where the acrobat might be
and then use the SHELL function to launch the application?
Quote:

>I would really appreciate it, if somebody could provide  me some
>snippets of the code to do that....

>I need it immediately....
>Thank YOu...

>Srinivas

>-----------------** -- Posted from CodeGuru -- **-----------------
>http://www.codeguru.com/vb         The website for VB programmers.



Mon, 24 Sep 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Opening a .pdf file using Acrobat Reader from VB

2. Adobe Acrobat reader and Visual Basic

3. Visual Basic with Acrobat Reader on 3.11

4. Internal Error with pdf.ocx (Acrobat Reader)

5. Export to pdf and excell fails after upgrade to Acrobat Reader 5.0

6. CR 8 PDF printing from Acrobat Reader

7. ActiveX DLL to read Adobe Acrobat PDF file

8. Acrobat PDF Files -> Help File convertion

9. Read Shell Entry for Acrobat Reader in HK_CLASSES_ROOT

10. vb5 help with Adobe Acrobat and printing .pdf files

11. Launching Acrobat Reader and Opening File ?

12. Acrobat files within Visual Basic?

 

 
Powered by phpBB® Forum Software