How do I parse RTF formatted text using Delphi? I need to parse RTF(the rtf contains text with many fonts) to extract font name and plain text formatted with that font and put it in a list. I know that I can use Trichedit SelAttributes to achieve that, but using visual control makes it very slow for large text.
Asked
Active
Viewed 1,122 times
0
-
1Have a look [here](https://stackoverflow.com/questions/3227899/using-trichedit-at-runtime-without-defining-a-parent). – Uli Gerhardt Jul 11 '17 at 04:51
-
1It uses Trichedit. I want to avoid trichedit because using it to parse RTF is slow for large text – Je Hk Jul 11 '17 at 05:15
-
Parsing RTF is a complex and painfull task. Read the whole Q&A, especially https://stackoverflow.com/a/3229070/1431618. :-) – Uli Gerhardt Jul 11 '17 at 05:30
-
The RTF specification includes C example code for RTF parser (see http://latex2rtf.sourceforge.net/rtfspec.html). – mjn42 Jul 11 '17 at 06:12
-
Thanks. Will look into it – Je Hk Jul 11 '17 at 06:53