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

NextPrevUpTopContentsIndex

print-text

Function
Summary

Prints plain text to a printer.

Package

capi

Signature

print-text line-function &key printer tab-spacing interactive font

Description

The function print-text prints plain text to a printer specified by printer , and defaulting to the current printer.

The line-function is called repeatedly with no arguments to enumerate the lines of text. It should return nil when the text is exhausted.

The tab-spacing argument, which defaults to 8, specifies the number of spaces printed when a tab character is encountered.

print-text starts a new page when a line consisting of just a formfeed character (ASCII 12) is found in the text.

If interactive is t, then a print dialog is displayed. This is the default behavior.

font should be a gp:font object, or a Font Description object, or a symbol which is a font alias as defined by define-font-alias. The printed text is line wrapped on the assumption that the font is fixed width, so be sure to pass a suitable font. The default value of font is a Font Description for a fixed pitch font of size 10.

See also

print-editor-buffer
print-file
Printing from the CAPI—the Hardcopy API


CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017

NextPrevUpTopContentsIndex