Adobe acrobat 7.0.5 sdk User Manual

Page of 122
Creating PDF Documents
Creating PDF Documents from an Authoring Application
4
40
Apple Event Support
The Macintosh version of Distiller supports Apple events. Apple events can be used from 
external applications written in programming languages such as C or from AppleScript. 
Because AppleScript is more straightforward, using it is the recommended way to use 
Apple events with Distiller.
Distiller supports the following Apple events:
The 
Distill
 command distills one or more PostScript language files, creating a PDF 
file for each.
The 
run
 command launches Distiller.
The 
quit
 command quits Distiller.
Distiller Automation on Windows Using OLE Automation
For Windows, you can automate Distiller under Microsoft Windows through the 
Automation interface also known as OLE Automation (commonly referred to as ActiveX or 
COM). The Automation interface makes it easy to create and control a Distiller from any 
programming language that supports Automation. Distiller supports programming 
environments written for the following languages:
Visual Basic 
Visual C++ with and without MFC
Distiller exposes one interface: 
PdfDistiller
. This interface provides methods and 
properties to invoke Distiller and to customize Distiller properties. For example, you can:
Specify that a particular settings file be used rather than the default settings file
Apply security to the generated PDF file
Specify whether to spool the job or execute it immediately
You can also use the Distiller API to check the status and errors associated with a Distiller 
job. 
As it processes each job, Distiller fires several events to notify you of its progress. These 
events can be accessed using the 
PdfDistiller
 interface.
In addition, certain features of Distiller can be controlled directly through the PostScript 
language file (see 
). Authoring 
applications that control Distiller should also provide an interface to their users to allow 
control of font embedding and image compression as well as downsampling in the PDF file.
For more information, see the Acrobat  Distiller API Reference.