• Hi + tx for every answer!

    What is the best way to basically deal with RTF strings (= {\rtf1\ansi ...... }) ? I want to convert a plain unformatted ANSI string to RTF, I want to concate RTF strings, I want to remove all formattings from a RTF string, ...

    Is there any RTF engibe I can use for these tasks?

    tx Bernd

    • Offizieller Beitrag

    Hi,

    to remove all formattings from an RTF text there is a very fast function
    function WPToolsRTFToANSI(const inputstring: AnsiString; Codepage : Integer = 1252; maxlength : Integer = 0): AnsiString;

    That is globally defined, not part of TWPRichText.

    You can also use
    WPRichText.AsString := rtftext

    ansitext := WPRichText.AsANSIString('ANSI') which will work a lot slower than the above method.