Programming with Quartz: 2D and PDF Graphics in Mac OS X

You can use the Quartz API in a number of interesting ways to write UNIX tools and scripts that create graphics and process PDF files, including the following:
Providing graphics processing capabilities that are useful for creating dynamic web pages that contain Quartz drawing.
Adding to the capabilities of the printing system through the PDF workflow that is available during printing.
Providing command line tools that sophisticated users can use for special graphics processing needs, such as PDF manipulation or examination.
Supplying Automator actions that perform specialized PDF functions. Automator is a tool, introduced in Tiger, that lets users easily assemble scripts (actions).
You don't need to write an application to accomplish any of these tasks. You need only to build a UNIX tool or script; a graphical user interface isn't necessary. This chapter shows two ways to use Quartz from a tool. The first is from a Python script and the second is from a command-line-style tool written using C.
You can use Python with Quartz for a number of tasks, such as to create PDF documents or image files in various file formats. You won't learn how to program in Python in this chapter. Instead, you'll see how to use Quartz in Python scripts that run in Panther and later versions. If you don't know Python already, you'll still be able to read the examples in this chapter and get an idea of how easy it is to use Python with Quartz.
Using the C programming language...