I am using TRichEdit::Print(AnsiString Caption) to print the contents of a Rich Edit control. Why does the caption not print at the top of any of the pages?
According to the help files, “The Caption parameter specifies the title that appears on the printed output.” This is incredibly misleading. The only printed output on which this string would appear is a network print job banner page. There is no code in TRichEdit::Print() to print headers or footers of any kind. The Caption string is actually assigned to the Title property of Printer (the global TPrinter object). This, in turn, is displayed in the Print Manager (or print spooler) and, as I mentioned, on network print job banner pages. You can, of course, print your own headers and footers. See the paper titled Printing and Previewing Rich Edit Controls available on this site.