Why metods LoadRTFFromStream and SaveRTFToStream no Pictures

General TRichView support forum. Please post your questions here
Post Reply
Djordano_Bruno
Posts: 1
Joined: Tue Aug 19, 2008 8:27 am

Why metods LoadRTFFromStream and SaveRTFToStream no Pictures

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Can you send me this RTF as a file?
(also check, may be RichViewEdit.RTFReadProperties.IgnorePictures was accidentally set to True)
Post Reply