Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 13th, 2008, 08:05 AM
Authorized User
 
Join Date: Apr 2008
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?



 
Old May 13th, 2008, 11:10 AM
Friend of Wrox
 
Join Date: Dec 2004
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
 
Old May 13th, 2008, 04:01 PM
Authorized User
 
Join Date: Apr 2008
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?

 
Old May 14th, 2008, 12:46 AM
Friend of Wrox
 
Join Date: Dec 2004
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
 
Old May 14th, 2008, 08:49 AM
Authorized User
 
Join Date: Apr 2008
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.

 
Old May 14th, 2008, 09:37 AM
Friend of Wrox
 
Join Date: Dec 2004
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
 
Old May 14th, 2008, 10:50 AM
Authorized User
 
Join Date: Apr 2008
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.






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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.