I am trying to load a RTF file in TWPRichText, but the attached file does not open up properly as the colors are inverted. But the file opens up correctly in MS Word or any other rich edit based editor.
\cbpatN N is the background color of the background pattern, specified as an index into the document's color table.
Does this mean that the background color of the background pattern is the same as the paragraph background color?
Of course, we can fix this anomoly on file load, just wanted to make sure since word and wordpad have a white background and wptools has a black one for this file.
RTF uses a quite funny description for paragraph backgrounds. In fact it uses a pattern, a forground and a background color.
WPTools5 supports both properties but they are cont consequently used. So it makes assumtions what to display. This is required since there are RTF files out there which were written with WPTools 3 and 4 which did not differentiate between the B and F color.
I never had the problem as in your file and I would rather not change the reader because of one file.
Like before, not a major issue, but, I this and a lot more files are generated from Abbyy's FineReader, so, it is not just one file. It is possible that there may be more such sources.
Was wondering if it would be possible to add a WPTools 3/4 compat define to the RTF reader, which remains the default and preserves the current behaviour, but, can optionally be changed at compile time to be more in line with word/wordpad in this case...?