Problem formatting RTF

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

Problem formatting RTF

Post by rafik_lp »

Hello,

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 ?

Thank's
Attachments
memo_test.rtf
(4.04 KiB) Downloaded 1148 times
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

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