Binds a variable to either t or nil, and executes a body of code to print a page only if the variable is t.
capi
with-page (printp) &body body
| printp⇩ |
A symbol (not evaluated). |
| body⇩ |
Lisp forms. |
The macro with-page binds printp to t if a page is to be printed, or nil if it is to be skipped. The forms in body are evaluated once as in implicit progn, and are expected to draw the document only if printp is t.
Each call to with-page contributes a new page to the document.
with-page must be called within the dynamic context of with-print-job.
with-page does not work on Cocoa.nil when only part of the document is printed, for example when the user specifies that she wants only odd pages. When printp is nil, the code in body needs to ensure that the next call to with-page prints the right page.
with-document-pages
with-page-transform
with-print-job
16 Printing from the CAPI—the Hardcopy API
CAPI User Guide and Reference Manual (Unix version) - 18 Feb 2025 15:34:22