RpPrinter:_DrawRTF() Method

<< Click to Display Table of Contents >>

Navigation:  RpPrinter & PtrDevice Class Overview > RpPrinter Class >

RpPrinter:_DrawRTF() Method

Previous pageReturn to chapter overviewNext page

Purpose

To draw a RTF stream on the printer or print preview window using an already initialized RTF object.

Syntax

<oRpPrinter>:_DrawRTF([nY], [nX], oRTF, [nHeight], [nWidth], [nStartChar], [lPrint])

Arguments

nY

 Optional.  The row to start printing the RTF stream.  The default is the current PROW setting.

nX

 Optional. The column to start printing the RTF stream.  The default is the current PCOL setting.

oRTF

 The RTF object which was previously initialized.

nHeight

 Optional.  The height of the rectangle bounding the RTF text.  The default is the remaining space on the current page.

nWidth

 Optional.  The width of the rectangle bounding the RTF text.  The default is the remaining space on the current page.

nStartChar

 Optional.  The character in the RTF text to start printing at.  The default is the first character.

lPrint

 Optional.  Determines if the RTF text is actually printed.  If FALSE, the RTF text is not printed but the height of the text is calculated.  The default is TRUE.

Description

This low-level method prints a RTF stream on the printer or print preview window.  The RTF object, which contains the parsed RTF stream, must be initialized prior to calling this method.  In general, you should use the RpPrinter:DrawRTF method as it automatically handles loading and unloading the RTF stream from a file.  This method is provided for when you wish to avoid the overhead of  repeatedly loading and parsing the same RTF stream over and over again or for when you what to span RTF printing across multiple pages.  For more information, see the discussion of the RTF class.

Example

// Draw an RTF stream from a RTF object

oRpPrinter:_DrawRTF(, , oRTF)