The Preview application (in Mac OS X v10.3 and later) automatically converts PostScript files to PDF. The Quartz 2D API provides functions you can use to perform PostScript conversion in your application, as long as it runs in Mac OS X v10.3 and later.
Follow these steps to convert a PostScript document to a PDF document:
Write callbacks. Quartz communicates the status of per page processes through callbacks.
Fill a callbacks structure.
Create a PostScript converter object.
Create a data provider object for the PostScript file you want to convert.
Create a data consumer object for the PDF that results from the conversion.
Perform the conversion.
Each of these steps is discussed in the sections that follow.
Writing Callbacks
Filling a Callbacks Structure
Creating a PostScript Converter Object
Creating Data Provider and Data Consumer Objects
Performing the Conversion
Last updated: 2007-12-11