Page 1 of 1

Why metods LoadRTFFromStream and SaveRTFToStream no Pictures

Posted: Tue Aug 19, 2008 8:36 am
by Djordano_Bruno
Hi.
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;
Thanks.

Posted: Tue Aug 19, 2008 2:41 pm
by Sergey Tkachenko
Can you send me this RTF as a file?
(also check, may be RichViewEdit.RTFReadProperties.IgnorePictures was accidentally set to True)