WPCubed Product Support

Merging text: formatting is lost on empty lines

Hi,

I have the problem that whenever I do a merge for a document that uses more than one font or more than one font size, (most) empty lines in the document are being reformatted to use a different font or a different font size.
Has anyone else had the same issues..?

Version is WPTools V 6.04

#1 ♥ 0
7.2k Views 3 users read 2 min
support

Hi,

What kind of "merge" do you mean. Which API call or loading?

Julian

#2 ♥ 0

We are using TWPSuperMerge.

wpmerge : TWPSuperMerge;
wpt, wps : TWPRichTextEdit;

wpmerge.OnMailMergeGetText := WPSuperMerge1MailMergeGetText;
wpmerge.BeforeProcessGroup := WPSuperMerge1BeforeProcessGroup;
wpt.ClearEx(true,true,false);
wpt.Header := wps.Header;
wpt.ParStyles.Assign( wps.ParStyles);
wpmerge.Options := [wpDeleteFieldsInDestination];
wpmerge.SetSourceDest(wps.RTFData, wpt.RTFData);
wpmerge.Invalidate;
icursor := -1;
wpmerge.Execute;
Result := TMemoryStream.Create;
wpt.SaveToStream(Result);

wps has been loaded before via wps.LoadFromStream(source)

Our current workaround is not to pass the original stream but to make a copy of it and to make sure that every line in this copy at least contains a blank (<space>) in it. Then the formatting is retained.

#3 ♥ 0

Perhaps it has to do with the TWPRichText.AutomaticTextAttr ?
Just a thought...
Wolfgang

#4 ♥ 0

I think we actually solved this issue by applying the RTFProps.

wpt.RTFData.RTFProps := wps.RTFData.RTFProps;
#5 ♥ 0
This category is archived. No new posts are possible.