Loading from RTF stream does not show any data
Posted: Tue Mar 01, 2016 1:11 pm
I am probably doing something very simple wrong. I have an RTF document saved within a database as a Blob field. I load this into a string and then stream it into a RichViewEdit document, but nothing is displayed:
MemStream.Clear;
i := length(RTFString) * SizeOf(RTFString[1]);
MemStream.Write(RTFString,i);
if not rve.LoadRTFFromStream(MemStream) then
begin
Result := 'Unable to Load RTF';
Exit;
end;
When debugging i comes out as just over 3700
The RTFReadProperties use the defaults with rvrsAddIfNeeded.
Please help
MemStream.Clear;
i := length(RTFString) * SizeOf(RTFString[1]);
MemStream.Write(RTFString,i);
if not rve.LoadRTFFromStream(MemStream) then
begin
Result := 'Unable to Load RTF';
Exit;
end;
When debugging i comes out as just over 3700
The RTFReadProperties use the defaults with rvrsAddIfNeeded.
Please help