Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## print-rich-text

Arguments: rich-edit-pane printer-stream &key (start 0) (end :end) (left (left-margin printer-stream t)) (top (top-margin printer-stream t)) (right (right-margin printer-stream t)) (bottom (bottom-margin printer-stream t))

Prints all or part of the text of rich-edit-pane (which must be an instance of the `rich-edit-pane` class) to printer-stream.

start and end specify the range of characters of the rich-edit-pane to print, and default to the full text of the rich-edit-pane. end is generally an integer like start, but can also be :end (the default) to indicate the end of the text.

left, top, right, and bottom indicate the rectangular region of the printed page to print the text to, and are measured in pixels. These values default to the margins of the printer stream, which are established based on what the end user specified in the page setup dialog (or to half an inch, if the user has not invoked this dialog). When passing in custom values, it is best to pass in values that are added to (or subtracted from) these defaults, since the margins are internally calculated to be relative to the hard margins beyond which the printer cannot print. Also, the function stream-units-per-inch may be called on the printer stream to find the resolution of the printer. So to print text with a left margin that is two inches in from the page margin requested by the end user, you would pass the :left argument like this:

       :left (+ (left-margin printer-stream t)
             (* 2 (stream-units-per-inch printer-stream)))

See cg-rich-text.htm for information about rich text editing in Common Graphics.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version