The macro with-print-job
creates a print job which prints to
printer
. If
printer
is not specified, the default printer is used. The macro binds
var
to a graphics port object, and printing is performed by using Graphics Ports operations to draw the object.
If
pane
is non-nil it must be an instance of output-pane or a subclass. In this case
var
is bound to
pane
, and
pane
is modified within the dynamic extent of the with-print-job
so all drawing operations draw to the printer instead of
pane
. This can be useful when implementing printing by modifying existing redisplay code that is written expecting an output-pane. If pane is nil
,
var
is bound to a graphics port of type printer-port, which is alive only inside the body of with-print-job
, and sends any drawing into it to the printer.
jobname
is the name of the print job. The default value is nil
, meaning that the name "Document" is used.
The actual printing is done by using one of the macros with-document-pages or with-page, within the scope of with-print-job.
owner
specifies the owner of the printer port object, which calls to port-owner will return. This has an effect only when
pane
is nil
.
drawing-mode
should be either :compatible
which causes drawing to be the same as in LispWorks 6.0, or :quality
which causes all the drawing to be transformed properly, and allows control over anti-aliasing on Microsoft Windows and GTK+. If
pane
is supplied, then
pane
determines the print job's
drawing-mode
, otherwise the default value of
drawing-mode
is :quality
.
For more information about drawing-mode , see The drawing mode and anti-aliasing.
(example-edit-file "capi/graphics/metafile")
(example-edit-file "capi/printing/fit-to-page")
(example-edit-file "capi/printing/multi-page")
(example-edit-file "capi/printing/page-on-demand")
port-owner
printer-port-handle
printer-port-supports-p
set-printer-options
with-document-pages
with-page
with-page-transform
Printing from the CAPI—the Hardcopy API
Drawing - Graphics Ports
CAPI User Guide and Reference Manual (Macintosh version) - 3 Aug 2017