Tell me, please, is there any function in WinAPI or in standard Delphi libraries for converting from RTF to TXT. Something like: at the input of TStream with RTF and at the output of String or PChar.

The option to create a runtime TRichEdit please do not offer.

    1 answer 1

    No, neither in WinAPI, nor in standard Delphi libraries.
    Do not create problems - use TRichEdit or TRichView .
    If you do not want to use them, write the RTF parser. Material about structure RTF:
    Wikipedia
    RTF author
    Parsing
    Here is an example of how a person is perverted, convert RTF to HTML (SGML).

    • Sadly RTF is one of the basic formats for Clipboard, and it is absolutely incomprehensible why WinAPI does not include conversion to plain text. - KiTE
    • But through the clipboard you can and try ... <br> Although no - it will not work, you need to write the data yourself in the buffer as well as RTF and text, and only then the buffer will know what is in it as RTF it is like this, but as a text it is like that. - toxicdream
    • one
      Yes, several formats are written to the buffer at once - KiTE