Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 13th, 2008, 08:05 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Open PDF within vb6



Hello,
I'm trying to open a document in PDF format within my VB6 app. I've tried googling this but haven't come across any clear directions. Can anyone help or direct to a site that may assist, please?



Reply With Quote
  #2 (permalink)  
Old May 13th, 2008, 11:10 AM
Friend of Wrox
Points: 687, Level: 9
Points: 687, Level: 9 Points: 687, Level: 9 Points: 687, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: Chennai, Tamilnadu, India.
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

refer the "Adobe Acrobat 7.0 Browser Control Type Library" from the components (that is AcroPDF.dll) which comes with the acrobat reader. You will see the physical control in the tool box, drag it to the form as set as needed. Then in the form load or on the button click call this...

me.AcroPDF1.LoadFile (<filename>)

It will loads the file as needed.

This control or dll can also be shipped easily in the .msi installer package on any client pc. Check this.

Hope this helps.

With Regards,
Raghavendra Mudugal
Reply With Quote
  #3 (permalink)  
Old May 13th, 2008, 04:01 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Good afternoon Raghavendra,
Thank you for replying. I added the component that you suggested, pull the control onto a form, but as i did this i got a message saying that Adobe reader that is running cannot be used to view PDF files in a webbrowser and suggest i exit. If i click 'OK' and try to proceed, i get a unspecified system error and it crashes the application.
Any thoughts on this?

Reply With Quote
  #4 (permalink)  
Old May 14th, 2008, 12:46 AM
Friend of Wrox
Points: 687, Level: 9
Points: 687, Level: 9 Points: 687, Level: 9 Points: 687, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: Chennai, Tamilnadu, India.
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

okay...

check for this file in program files folder
(C:\Program Files\Adobe\Acrobat 7.0\ActiveX...)
- AcroPDF.dll (file ver... 7.0.5.0
- pdfshell.dll (file ver... 7.0.0.0)

I am using these files for component reference, and i am not seeing any error here. Even I can open multiple instance of this component and load diff files, but you cannot open one file from component and the reader, it will be shared lock.

Post some more information here with your pc's existing version file and your code snippet on how you are processing....

this like should work... Me.AcroPDF1.LoadFile "c:\f1.pdf"

Hope this helps...

With Regards,
Raghavendra Mudugal
Reply With Quote
  #5 (permalink)  
Old May 14th, 2008, 08:49 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Morning Raghavendra,
After reading your reply, I checked the folder and those Dlls were not in there. The folder was empty. Then i realized that i have Acrobat 5.0 installed and 8.0 Reader. As regards the codes, well i was trying to use your suggession. Ofcourse they can't work, since the component is not functioning. I hope this is enough information for you.
Thanks so far for you help.

Reply With Quote
  #6 (permalink)  
Old May 14th, 2008, 09:37 AM
Friend of Wrox
Points: 687, Level: 9
Points: 687, Level: 9 Points: 687, Level: 9 Points: 687, Level: 9
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2004
Location: Chennai, Tamilnadu, India.
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi;

check this like might help you forever-
http://www.adobe.com/devnet/acrobat/?tab:downloads=1/

when developing apps, first check point is tools what we need and are we having it... without active x component how are you trying? And Please let me know what adobe component you see in the component dialog box in VB6 and the path where it is located.

hope this helps

With Regards,
Raghavendra Mudugal
Reply With Quote
  #7 (permalink)  
Old May 14th, 2008, 10:50 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
The decision to include the user manual (PDF file) in the application came close to the end of development. The Adobe component i'm seeing is Adobe Acrobat 7.0 Browser Control Type Library 1.0. The ocx file for this component is stored in my WINNT folder on my C drive.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pdf files doesn't open Ciupaz BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 2 September 11th, 2008 04:36 PM
Open PDF From Form wb8bgy Visual Basic 2005 Basics 3 February 28th, 2007 02:31 PM
Open pdf document ppenn Access VBA 1 February 20th, 2007 12:31 PM
Zoom, PDF file problem in VB6 naveed77 Beginning VB 6 0 July 29th, 2006 08:48 PM
open a pdf file viren_balaut Servlets 0 January 24th, 2004 01:03 AM



All times are GMT -4. The time now is 06:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.