Please enable JavaScript to view this site.

How do I print RTF files (a) in general, and (b) so that they the interpret RTF commands instead of printing them?

There are three ways to print files containing RTF commands:

1.Create a print filter that uses MX_SHELLEX or HOSTEX to force it to be printed by some RTF-aware application (like Wordpad). This of course only works if the entire printfile is RTF, and will not work if you want to include this RTF text in a larger report which contains plain text.
2.Use the internal XTEXT print function. This is similar to option one, but needs to be invoked by the user while looking at the text.
3.Use the //XTEXT GDI printing command. This is the only option that would allow you to combine XTEXT/RTF within a larger printfile, but it does require that the entire printout file be printed through the GDI printing mechanism. This would rule out direct printing from Linux to the printer; you'd have to instead use the AUXLOC: device to route the printing through ATE. And also would eliminate the use of escape sequences to set printer functions. So it may require some other modifications to your printing logic. But fortunately, GDI reports accept plain text, so it isn't necessary to convert the entire thing to RTF.

You may also want or need to use MX_GDICALC to calculate the space needed for a particular XTEXT chunk, so that you can decide whether to start a new page first. See the program MMOGDI in EXLIB:[908,37] for an example of that.

Created with Help+Manual 9 and styled with Premium Pack Version 5 © by EC Software