WPCubed Product Support

Missing Font attributes

I am having problem with Font attributes (Name, Size, Bold,...) changing when I am merging several sections.

At this point, certain WPtoolsfont tags visible before the merge are not visible in the merged document.

For example:
<cs nr=11 wpsty=[[CharFont:'Arial';CharFontSize:1600;CharStyleMask:5;CharStyleON:5;CharColor:clBlack;]]/><div cs=11 wpsty=[[Alignment:1;IndentLeft:0;IndentFirst:0;IndentRight:0;SpaceBefore:240;TabL:8100;]]><c nr=11/>EXHIBIT B</div>

is changed to...

<div wpsty=[[Alignment:1;IndentLeft:0;IndentFirst:0;IndentRight:0;SpaceBefore:240;TabL:8100;]]><c nr=38/>EXHIBIT B</div>

I would like the system not to remove the formatting ( or try to minimize the formatting tags).

This may be related to "-DontFixAttr" yes/no?
Where exactly is this "FormatOption" located for "-DontFixAttr"?
Is it a property on a component? - can't find it.

Thanks

#1 ♥ 0
2.6k Views 2 users read 2 min
support

Hi,

"DontFixAttr" has to do with the RTF reader/writer. RTF does not define true style inheritance so some work arounds are necessary to make styles work. So the default styles - since they are defined anyway - are removed from the text so changing the default attribute can change the rendering of the text.

The WPT form does not have this problem. It only writes the attributes which are really there and refelects whats stored in the datastructores of the editor.

The cs tag represents an entry in the attribute cache - the index into this array is stored in par.CharAttr[].

So <cs> defines such a record (with up to 15 values) and <c> is later used to select this.

If in your text you have <c> this only means that the character style 28 is used which has been defined earlier. The WPT format is not very compact, but it does not write unnecessary information.

Maybe the problem is somewhere else:

When you use reporting or mail merge with AppendText you should use the same RTFDataProps object for both involved editors. Here the cs number in both editors would be the same for the same character attribute, the character record is shared. So in your destination you would also have <c>.

The MailM4 demo shows how this is set up.

Julian

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