Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 21st, 2024, 7:37 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Checking for Acrobat
PostPosted: May 19th, 2006, 1:00 pm 
Offline

Joined: November 3rd, 2004, 2:11 pm
Posts: 323
If you need to check for the presence of Acrobat before launching PDFs in your publications, here is a method for doing so. The only caveat for this method is that Windows 2000 puts the registry entry in by default, so this won't work on Windows 2000, but from what I have read, there really is no foolproof method for discovering whether Acrobat is on a machine.

This can go on a Page action on show. The b's referred to below in the code are buttons. One to launch a PDF, the other to go to Acrobat downloader. They are both set to be initially hidden.

Hope this helps folks.


Code:
var AcroInst = ReadRegistryKey("HKEY_CLASSES_ROOT\\.pdf", "Content Type");

if(AcroInst=='application/pdf'){
b1.Show();
}
else {
b2.Show();
}

_________________
Opus Pro XE 9.1 Win7 64-bit Core i3 8MB RAM


For this message bwpatric has been thanked by : mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group