Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View PDF files in Visual Basic 1

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
Hi

I would like to view a PDF file from a VB environment.
SHELL command cannot run AcroRD32.exe to pull my .pdf file.
Please suggest any other way to accomplish this.

thanks in advance

Kumar
 
In VB, if you have Adobe Acrobat reader installed, you can use the Acrobat object to view the file.

If you go to Project, Components, look for the entry Acrobat Control for ActiveX. If it is not there, click the Browse button and navigate to the file pdf.ocx (I found this in C:\Program Files\Adobe\Acrobat 4.0\Reader\ActiveX\pdf.ocx). Check the box next to the entry in the list, once you have selected the file, and you will then be able to place the control on your form.

Once the control is on your form, set the src property of the control (unfortunately there is no browse ability, so you have to type in the path and name of the pdf document) and then you can view the file.

Simon
 
thanks swilliams.

A question.. the client machine that get the vb prg need to install adobe acrobat reader?

thanks in advance
 
cripito -

Yes, they would have to have the Acrobat Reader installed. Which isn't that bad of a requirement -- most everyone has it already, anyway.

If you redistribute the reader with your product, Adobe has some requirements for you to fulfill before you can put the Acrobat logo on your packaging.

Chip H.
 
I have included pdf.ocx to m vb application but i was wondering how can i search a string in the context of the activex through my vb application ?????
I tryied to send keystrokes to it ( Ctrl+F & Search String ) . It worked but user could see what was happening.
Is there another way to do this ???
Please help if you can.
Thanks in advance

 
Is it possible to disable the save and print options?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top