Background colour (with \highlight) not importing from RTF?
Posted: Tue Mar 10, 2009 12:15 pm
Hi there,
I've been sent an RTF file produced by Word, which shows yellow highllighting on some strings of text. This shows up OK in WordPad, but fails to import into TRichView (I've tried with my app, and with the ActionTest demo). The highlighting is lost.
In this discussion:
http://www.trichview.com/forums/viewtopic.php?t=1800
you mentioned that "Wordpad does not understand text background, it understands text highlighting. Word understands the both of them. TRichView imports highlighting as text background, but saves only text background. "
so I think the \highlight tag should import correctly into TRichView. This is a sample of the RTF code which is causing the problem:
\par }{\cs16\fs20\cf1\lang2057\langfe2052\loch\af391\hich\af391\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid15162747\charrsid15162747 \hich\af391\dbch\af35\loch\f391 As a child, I used to love reading. Roald Dahl\hich\f391 \rquote \loch\f391
s stories used to be my favourite ones. However, I was educated to love sciences }{\cs16\fs20\cf1\lang2057\langfe2052\loch\af35\hich\af35\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid15162747\charrsid15162747 \hich\af35\dbch\af35\loch\f35
instead}{\cs16\fs20\cf1\lang2057\langfe2052\loch\af35\hich\af35\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid3624578 \hich\af35\dbch\af35\loch\f35 and, when I was in my teens, I }{
\cs16\fs20\cf1\lang2057\langfe2052\highlight7\loch\af35\hich\af35\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid3624578\charrsid12397010 \hich\af35\dbch\af35\loch\f35 stopped}{
\cs16\fs20\cf1\lang2057\langfe2052\loch\af35\hich\af35\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid3624578 \hich\af35\dbch\af35\loch\f35 }{
Can you see what might be causing the problem?
Cheers,
Martin
I've been sent an RTF file produced by Word, which shows yellow highllighting on some strings of text. This shows up OK in WordPad, but fails to import into TRichView (I've tried with my app, and with the ActionTest demo). The highlighting is lost.
In this discussion:
http://www.trichview.com/forums/viewtopic.php?t=1800
you mentioned that "Wordpad does not understand text background, it understands text highlighting. Word understands the both of them. TRichView imports highlighting as text background, but saves only text background. "
so I think the \highlight tag should import correctly into TRichView. This is a sample of the RTF code which is causing the problem:
\par }{\cs16\fs20\cf1\lang2057\langfe2052\loch\af391\hich\af391\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid15162747\charrsid15162747 \hich\af391\dbch\af35\loch\f391 As a child, I used to love reading. Roald Dahl\hich\f391 \rquote \loch\f391
s stories used to be my favourite ones. However, I was educated to love sciences }{\cs16\fs20\cf1\lang2057\langfe2052\loch\af35\hich\af35\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid15162747\charrsid15162747 \hich\af35\dbch\af35\loch\f35
instead}{\cs16\fs20\cf1\lang2057\langfe2052\loch\af35\hich\af35\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid3624578 \hich\af35\dbch\af35\loch\f35 and, when I was in my teens, I }{
\cs16\fs20\cf1\lang2057\langfe2052\highlight7\loch\af35\hich\af35\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid3624578\charrsid12397010 \hich\af35\dbch\af35\loch\f35 stopped}{
\cs16\fs20\cf1\lang2057\langfe2052\loch\af35\hich\af35\dbch\af35\chshdng0\chcfpat0\chcbpat8\langnp2057\insrsid3624578 \hich\af35\dbch\af35\loch\f35 }{
Can you see what might be causing the problem?
Cheers,
Martin