Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Introduction to Extending Printing Dialogs
As printer vendors and application developers extend the printing capabilities of their hardware and software products, they need a way to extend the Mac OS X printing system to make new printing features available to their customers. To address this need, Mac OS X has introduced the printing plug-in—a component architecture based on Core Foundation Plug-in Services.
There are four types of printing plug-ins in Mac OS X:
I/O modules are used by the printing system to communicate with a printer using a standard transport-layer interface, such as AppleTalk or TCP/IP.
Printer browsers provide a way for people to discover available local and network printers.
Printer modules are used by the printing system to convert the graphics content in a print job for output to a specific printer or family of printers.
Printing dialog extensions provide a way for people to view and change the settings for a set of related printing features. The user interface of a printing dialog extension is a pane in one of the printing dialogs.
This book is a guide to developing printing dialog extensions—including basic concepts, theory of operation, and a documented Carbon-based sample project.
Why Read This Book
You should read this book if:
You’re developing an application or a printer module, and you want to learn how to present your printing features using the Mac OS X printing dialogs.
Your existing software already extends a printing dialog, and you want to improve the interface or take advantage of advanced features in the Mac OS X printing system.
You want to see what’s involved in writing a printing plug-in.
Organization of This Document
The first part covers the basic concepts. Both Carbon and Cocoa developers will benefit from reading these chapters:
Printing Features and Printing Dialog Panes discusses standard printing features, printing dialog panes, methods of extending a printing dialog, and the advantages of using a printing dialog extension.
Interface Guidelines for Custom Panes presents guidelines for designing an interface for a custom pane in a printing dialog.
Printing Dialog Extension Concepts discusses the printing dialog extension—its functional components, runtime behavior, and capabilities.
The second part is a tutorial that shows how to construct and use a printing dialog extension:
Creating a Plug-in Project shows how Project Builder can help you create a plug-in project to build a printing dialog extension.
Core Tasks shows how to implement much of the basic functionality in a printing dialog extension.
Custom Tasks shows how to implement the additional functionality that’s specific to a custom pane.
Integration Tasks shows you how applications and printer modules install and communicate with their printing dialog extensions.
The appendixes cover a few remaining topics:
Utility Functions shows how to implement several utility functions that all printing dialog extensions can use.
Printing Plug-in Header Functions shows how to implement the three callback functions in the
PMPlugInHeader
interface.Document Revision History contains a chronological list of the revisions to this book.
Other Options for Application Developers
Carbon applications can also extend the printing dialogs using the AppendDITL
function, an older approach. Cocoa applications can extend the printing dialogs by adding an accessory view to an NSPageLayout
or NSPrintPanel
object.
In both cases, the printing system displays your custom controls inside a new dialog pane that’s named for your application. Your application can host only a single custom pane in each dialog.
The section Extending a Printing Dialog discusses the various options in more detail, and makes some recommendations.
Before You Start Reading
To get the most out of reading this book, you should first read Mac OS X Printing System Overview.
Printing Plug-in Interfaces Reference—the companion volume to this book—includes the reference documentation for the printing dialog extension API.
Both of these publications are available online in the ADC Reference Library.
You should also be familiar with Core Foundation plug-in concepts.
Copyright © 2002, 2006 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2006-10-03