WPCubed Product Support

bug in Open RTF file (background inverted)

6.6k Views 1 links 3 users read 2 min
support

It uses a black background in the paragraph:

\cbpat0

#2 ♥ 0

Hi,

I have a small query, according to the RTF spec,

\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.

#3 ♥ 0
support

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.

Julian

#4 ♥ 0

Hi Julian,

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...?

#5 ♥ 0
This category is archived. No new posts are possible.