This page provides an example of how to open PDF with Adobe Acrobat or Adobe Acrobat Reader using the DDE package. For more information see http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/intro_to_sdk/DeveloperFAQ.pdf , http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACOverview.pdf and http://partners.adobe.com/public/developer/en/acrobat/sdk/pdf/iac/IACReference.pdf .
package require dde if {[catch {registry get HKEY_CLASSES_ROOT\\acrobat\\shell\\open\\command {}} acrobat]} { puts stderr "registry: $acrobat" exit 1 } set acrobat [string range $acrobat 0 [string first " /u" $acrobat]] if {[catch {registry get HKEY_CLASSES_ROOT\\acrobat\\shell\\open\\ddeexec\\application {}} service]} { puts stderr "registry: $service" exit 1 } if {[catch {registry get HKEY_CLASSES_ROOT\\acrobat\\shell\\open\\ddeexec\\topic {}} topic]} { puts stderr "registry: $topic" exit 1 } if {[dde services $service $topic] == ""} { exec $acrobat & } dde execute $service $topic {[FileOpen("C:\IACReference.pdf")]}
Category Example | Category Package | Category Windows | Category DDE