Problem formatting RTF

General TRichView support forum. Please post your questions here
Post Reply
Posts: 1
Joined: Thu Nov 07, 2019 10:28 am

Problem formatting RTF

Post by rafik_lp »


I got an issue when trying to load a rtf.

The method "LoadRTF" of TRichView returns false when trying to load this rtf (see in attached).

Has anyone have an idea about the issue ?

(4.04 KiB) Downloaded 251 times

Sergey Tkachenko
Site Admin
Posts: 15166
Joined: Sat Aug 27, 2005 10:28 am

Re: Problem formatting RTF

Post by Sergey Tkachenko »

This RTF has the following code for a font table:

Code: Select all

{\rtf1\ansi{\fonttbl{\af0\fcharset0 Times New Roman;}
{\f1\fcharset0 Times New Roman;}
{\af2\fcharset0 Calibri;}
{\f3\fcharset0 Calibri;}
According to RTF specification, "\f" is required in font table entries. So TRichView treats "{\af2\fcharset0 Calibri;}" as an error.

Post Reply