All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

NextPrevUpTopContentsIndex

with-page

Macro
Summary

Binds a variable to either t or nil, and executes a body of code to print a page only if the variable is t.

Package

capi

Signature

with-page ( printp ) &body body

Description

The macro with-page binds printp to t if a page is to be printed, or nil if it is to be skipped. The body is executed once, and is 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.

Notes
  1. with-page does not work on Cocoa.
  2. The code in body should do the printing by calling standard GRAPHICS-PORTS drawing functions (see Drawing functions), typically also using with-page-transform.
  3. printp can be 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.
  4. Normally with-document-pages is the preferred method of printing.
See also

with-document-pages
with-page-transform
with-print-job
Printing from the CAPI—the Hardcopy API


CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex