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
Background colour (with \highlight) not importing from RTF?
-
- Posts: 131
- Joined: Mon Aug 29, 2005 12:03 pm
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17602
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I received this RTF.
The problem is the following. Just after the highlight keyword (\highlight), the text background (shading) keyword follows (\chcbpat). It instructs to make text background white.
Ok, I make changes to ignore shading for highlighted text. They will be uploaded with the next update.
The problem is the following. Just after the highlight keyword (\highlight), the text background (shading) keyword follows (\chcbpat). It instructs to make text background white.
Ok, I make changes to ignore shading for highlighted text. They will be uploaded with the next update.
Last edited by Sergey Tkachenko on Wed Mar 11, 2009 1:30 pm, edited 1 time in total.