Solved

Viewing Adobe reader PDF files

Posted on 1998-11-25
12
295 Views
Last Modified: 2010-08-05
Greetings,

Is there a solution for viewing the PDF file from VB. If yes what should be done in order to achive that.
Thanks
0
Comment
Question by:misha051797
12 Comments
 
LVL 4

Expert Comment

by:idcanada
ID: 1446851

Insert an OLE object onto your form and add the PDF or prompt
for a PDF file.

Their is no other way possible at the current momment.
However,
you might want to check Activex.com for a control that could view
these files. Of course, I do imagine that it would not come
cheap.

Best of luck.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1446852
As far as I know PDF in not an OLE Document. BTW you must have installed some PDF application in that case to view it.
A better suggestion is to download the free PDF ocx from the adobe site. This one you can add to the form to view your pdf file. I can't answer the question since it is locked by idcanada
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1446853
idcanada is wrong. There *IS* an OCX for Adobe. Mirkwood is right. It's easy to just, it's a complete Reader in one control. All you have to do is set the file name and the control does the rest.

M

0
 

Author Comment

by:misha051797
ID: 1446854
mark2150, the activex control i have downloaded is insertable in the vb application. I was able to set scr property to the pdf file i would like to view. And it did open my file. But when I wanted to load another file I used PDF1.LoadFile("d:\mypdf.pdf") and the Adobe Reader will respond "An Internal error has occured". Since the ActiveX control designed specifically for the WEB i tried to use strings like "file//d:\mypdf.pdf", but no luck. Therefore I think that it is not working.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1446855
Have you tried other PDF files as well? Maybe the one you tried is corrupted or contains something weird./
0
 

Author Comment

by:misha051797
ID: 1446856
idcanada thank you,
the problem is that adobe is not very open about the ADOBE READER ole stuff. i tried to reference pdf.tlb file and then i placed the ole control (-> adobe document) on my form. i do not think what you have suggessted above will work.

0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 13

Expert Comment

by:Mirkwood
ID: 1446857
Alternative might be to use the webbrowser control. Make the webbrowser control open the PDF file and start the plug-in.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1446858
Another option is to launch the PDF viewer and use setparent to make your window the owner.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1446859
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 500 total points
ID: 1446860
Anybody there...
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1446861
BTW: You have to use the src property iso loadfile and it does not work within VB. You have to compile and run the exe before it works.
0
 

Author Comment

by:misha051797
ID: 1446862
great, thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Window placement 17 65
A macro to Count the number of rows across all worksheets 3 63
message box in access 4 34
Copy a row 12 53
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now