CUPS Software Programmers Manual CUPS−SPM−1.1.23
Total Page:16
File Type:pdf, Size:1020Kb
CUPS Software Programmers Manual CUPS−SPM−1.1.23 Easy Software Products Copyright 1997−2005, All Rights Reserved CUPS Software Programmers Manual Table of Contents Preface..................................................................................................................................................................1 System Overview.....................................................................................................................................1 Document Overview................................................................................................................................2 Notation Conventions..............................................................................................................................2 Abbreviations...........................................................................................................................................3 Other References......................................................................................................................................3 1 − Printing System Overview...........................................................................................................................5 The Printing Problem...............................................................................................................................5 The Technology.......................................................................................................................................6 Jobs..........................................................................................................................................................6 Classes.....................................................................................................................................................6 Filters.......................................................................................................................................................6 Backends..................................................................................................................................................6 Printer Drivers..........................................................................................................................................7 Networking..............................................................................................................................................7 2 − The CUPS API..............................................................................................................................................9 The CUPS API Library............................................................................................................................9 Detecting the CUPS API Library in GNU Autoconf......................................................................10 Printing Services....................................................................................................................................10 Include Files....................................................................................................................................10 Printing a File..................................................................................................................................10 Printing Multiple Files.....................................................................................................................10 Cancelling Jobs................................................................................................................................11 Getting the Available Printers and Classes.....................................................................................11 Printing with Options......................................................................................................................12 Setting Printer Options....................................................................................................................13 Getting Errors..................................................................................................................................13 Passwords and Authentication.........................................................................................................14 PPD Services..........................................................................................................................................15 Include Files....................................................................................................................................15 Getting a PPD File for a Printer......................................................................................................15 Loading a PPD File.........................................................................................................................15 Freeing PPD File Information.........................................................................................................16 The PPD File Structure....................................................................................................................16 Marking Options..............................................................................................................................18 Checking for Conflicts....................................................................................................................19 3 − Writing Filters.............................................................................................................................................21 Overview................................................................................................................................................21 Security Considerations...................................................................................................................21 Users and Groups............................................................................................................................21 Temporary Files..............................................................................................................................21 Sending Messages to the User.........................................................................................................22 Page Accounting..............................................................................................................................22 Command−Line Arguments............................................................................................................22 Copy Generation..............................................................................................................................23 i CUPS Software Programmers Manual Table of Contents 3 − Writing Filters Environment Variables....................................................................................................................23 Dissecting the HP−GL/2 Filter..............................................................................................................23 Initializing the Filter........................................................................................................................23 PostScript Output...................................................................................................................................24 4 − Writing Printer Drivers.............................................................................................................................27 Overview................................................................................................................................................27 CUPS Raster Data...........................................................................................................................27 Page Accounting..............................................................................................................................28 Color Management..........................................................................................................................28 Device and Bitmap Variables..........................................................................................................28 Dissecting the HP−PCL Driver..............................................................................................................29 PPD Files.........................................................................................................................................29 Reading Raster Data........................................................................................................................30 5 − Writing Backends.......................................................................................................................................33 Overview................................................................................................................................................33 Security Considerations...................................................................................................................33 Command−Line Arguments............................................................................................................33 Copy Generation..............................................................................................................................33 Page Accounting..............................................................................................................................34