Posted on 2006-06-05
Last Modified: 2010-04-05

I have a little app to write that needs to autorun on startup and then give the user the chance to view pdf's from disk.

I have looked at calling the ocx supplied with Acrobat 7.0 and that works but...

If they don't have acrobat installed it fails - i have tried regisering the ocx but then it fails as it needs two other visual c librarys registering and even after registering them it fails ? - i want to try and make it compatiable between 98-XP?

I had seen some code on here for a similar question but this does not really help?

Question by:PHILFRED
    LVL 1

    Expert Comment

    Think i'd be tempted to check for the OCX on the user system and then actually distibute the Acrobat Reader setup on your disk if the OCX cannot be located. You could just register the OCXs but as you say, you're gonna need to make sure that you register all kinds of different ones for different systems. You could also create great incompatabilities if you start registering different OCX versions on the system, so I wouldn't recommend your existing path. Check for the AcroRead OCX control, and then ShellExecute the setup if it's not in any of the windows library paths. This is precisely how I do any Macromedia Flash distribution stuff I need to do. I bet someone will post just the code you're looking for in a few hours, but I would never try that route as I think this method is far more stable and less prone to causing end users errors.
    LVL 5

    Expert Comment

    Found something things that might... interest you

    But ye best thing to do is ship acroreader with your app, have it installed then use
    shellexecute to open the PDF... its a sure way of opening it...

    Peace Scay7

    Author Comment

    I tried the ocx approach but its all the DLL stuff - and compatiabilty between versions thats the problem.
    I did find a solution myself last night though - i used an autorun creation program that can fire a program and found a pdf view called foxreader - its adobe compatiable and dont need need any extra ocx's etc so i can fire that and it works fine! all from the CD...

    Thanks for the help - i was going down the ocx route and the check adobe is installed route myself as well.


    LVL 1

    Accepted Solution

    PAQed with points refunded (500)

    EE Admin

    Featured Post

    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.

    Join & Write a Comment

    Suggested Solutions

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    754 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

    21 Experts available now in Live!

    Get 1:1 Help Now