data-id=apple-events

Apple Events

Apple events can be used from programming languages such as C or from AppleScript. Because AppleScript is more straightforward, it is recommended for use with Distiller.

Distiller supports the application object and the following Apple events:

data-id=objects

Objects

application

data-id=90916
data-id=application

application

The top-level scripting object.

Elements

Properties

Property
Class
Description
postScriptVersion
Unicode text [r/o]
PostScript interpreter version; for example, “3016.102”.
locale
Unicode text [r/o]
Three-character language code for the Distiller user interface (for example, “ENU” is English).
frontmost
Boolean [r/o]
True if Distiller is the active application.
name
Unicode text [r/o]
Name of the application.
version
Unicode text [r/o]
Version of the application.
data-id=events

Events

data-id=75815
data-id=distill

Distill

Distills a file.

Syntax

Distill
sourcePath UnicodeText [destinationPath UnicodeText]

    [adobePDFSettingsPath UnicodeText]

Parameters

Parameter
Description
sourcePath
POSIX path to the input file (the file to be distilled).
destinationPath
POSIX path to the output file. If not specified, the PDF file is generated in the same folder as the input file.
adobePDFSettingsPath
Either the POSIX path to the Adobe PDF Settings file, or the name of one of the settings files in Distiller. If not specified, the settings file selected in the application is used.

Returns

A Boolean value indicating status. If true, the command succeeded.

Examples

These examples assume the presence of an appropriate tell – end construct, for example:

tell application "Acrobat Distiller 8.0"
         [Your code]
 end tell

Ensure each command is on one line without line breaks. Some of the following examples appear on two lines solely to fit the page.

Distill sourcePath "/hello.ps"
Distill sourcePath "/hello.ps" destinationPath "/Users/username/Desktop"
          adobePDFSettingsPath "Standard"
Distill sourcePath "/hello.ps" adobePDFSettingsPath "/Library/
          Application Support/Adobe PDF/Settings/"

The following example uses application properties to determine which settings file is used:

set distSetting to "Standard"
 if (postScriptVersion as string) is equal to "3015.102" then
         set distSetting to "High Quality"
 end if
 if locale is "CHT" then
         set distSetting to "Smallest File Size"
 end if
 Distill sourcePath "/hello.ps" adobePDFSettingsPath distSetting
data-id=12807
data-id=quit

quit

Terminates the Distiller program.

Syntax

quit
data-id=39237
data-id=run

run

Launches the Distiller program and invokes its standard startup procedures.

Syntax

run