Prints a RTF file
Usage:
dirPrintRTF (object me, string Rtf, integer bShowPrintDialog)
Parameters:
Rtf (string) - a rich text format string
bShowPrintDialog (boolean) - show a print dialog before printing. A TRUE or 1 will show the print dialog, any other value will automatically send the print job to the default printer.
Returns:
(integer) - The success code
Example1:
-- example demonstrates how to directly print a Director rich text member
xtRose = xtra("Rosetta").new( )
xtRose.dirPrintRTF( member(3).rtf, 0 )
Example2:
-- example shows the use of file io functions to read an external binary file
-- then sends the file to the printer
xtRose = xtra("Rosetta").new( )
-- use IO to read binary string
xtRose.ioOpen( "C:\documentation.rtf", 1 )
nSize = xtRose.ioSize( )
strRTF = xtRose.ioRead( nSize )
xtRose.ioClose( )
-- show a print dialog and print the rich text
xtRose.dirPrintRTF( strRTF, TRUE )
Notes:
Images encoded in the RTFs are not supported, and will not print.
UNICODE is supported in the RTF standard. Use Rosetta's IO functions to read the binary RTF string.
Not all operating systems and printers can print characters from more than one code page. Some operating systems such as Windows 98 and NT 4 have very limited unicode support. Printers that have built-in fonts might not have characters for other scripts in those fonts.
See Also: