[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

AUTORUNNING PDF'S FROM DISK

Hi,

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?

Regards
Phil
0
PHILFRED
Asked:
PHILFRED
1 Solution
 
henrythackerCommented:
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.
0
 
Scay7Commented:
Found something things that might... interest you

http://www.delphi3000.com/articles/article_1642.asp?SK=
http://www.ghostscript.org/

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
0
 
PHILFREDAuthor Commented:
Hi!
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.

Thanks

Phil
0
 
Computer101Commented:
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now