Why metods LoadRTFFromStream and SaveRTFToStream no Pictures
Posted: Tue Sep 11, 2018 9:56 am
Hi.
Why save / loading of the data in / from database together with pictures through RTF does not work?
Through RVF save / loading works.
Thanks.
Why save / loading of the data in / from database together with pictures through RTF does not work?
Through RVF save / loading works.
Code: Select all
procedure TRichEditFrame.LoadFromStream(Stream: TStream);
begin
// Filling font names combobox
cmbFont.Properties.Items.Assign(Screen.Fonts);
Visible := False;
RichEdit.Clear;
if Stream.Size <> 0 then
begin
Stream.Seek(0, soFromBeginning);
// RichEdit.LoadRVFFromStream(Stream); //lion
RichEdit.LoadRTFFromStream(Stream); // Alex
end;
RichEdit.Format;
// you can delete non default styles here...
RichEditCurTextStyleChanged(nil);
RichEditCurParaStyleChanged(nil);
SetParantFont;
Visible := True;
RichEdit.Modified := False;
end;
procedure TRichEditFrame.SaveToStream(Stream: TStream);
begin
Stream.Size := 0;
// RichEdit.SaveRVFToStream(Stream, False); //lion
RichEdit.SaveRTFToStream(Stream, False); // Alex
RichEdit.Modified := False;
end;