All Manuals > CAPI User Guide and Reference Manual

16 Printing from the CAPI—the Hardcopy API

The CAPI hardcopy API is a mechanism for printing a Graphics Port (and hence a CAPI output-pane) to a printer. It is arranged in a hierarchy of concepts: printers, print jobs, pagination and outputting.

Printers correspond to the hardware accessible to the OS. Print jobs control connection to a printer and any printer-specific initialization. Pagination controls the number of pages and which output appears on which page. Outputting is the operation of drawing to a page. This is accomplished using the standard Graphics Ports drawing functions discussed in 13 Drawing - Graphics Ports.

Printing is done by using the macro with-print-job to define a job. Inside its body you specify pages to print by either with-document-pages ("page on demand printing") or with-page ("page sequential printing"). Inside the body of with-document-pages or with-page you use normal drawing functions on the variable bound by with-print-job to draw the page. You normally also use with-page-transform to specify the transformation to the page area. There are also several functions for simple printing jobs.

16.1 Printers

16.2 Print jobs

16.3 Handling pages—page on demand printing

16.4 Handling pages—page sequential printing

16.5 Printing a page

16.6 Other printing functions

16.7 Printing on Motif

CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:25