This question is related to the question I've asked before http://www.trichview.com/forums/viewtop ... f307f83c2a.
So I chose the second option with invisible form and converting RTF into RVF. The problem is initial styles in RTF differ from styles I get in RVF while converting and therefore from styles that I get in TRichView where I insert the text to.
Here is the source RTF I want to insert into TRichView https://drive.google.com/open?id=0ByzSd ... TRvZkRONmM.
And here is the way I insert that RTF into the hidden TRichViewEdit:
Code: Select all
function RTFToRVE(RTF: TStream): TStream;
begin
FRve.Clear;
FRve.DeleteUnusedStyles(True, True, True);
if not FRve.LoadRTFFromStream(RTF) then
raise ERTFException.Create('Error RTF load!');
FRve.Format;
// And just now save the text in two formats
FRve.SaveRTF('C:\***\Value.rtf', False);
FRve.SaveRVF('C:\***\Value.rve', False);
end
I've set TextStyleMode and ParaStyleMode to the invisible RVE but it doesn't help
Code: Select all
FRve.RTFReadProperties.TextStyleMode := rvrsAddIfNeeded;
FRve.RTFReadProperties.ParaStyleMode := rvrsAddIfNeeded;