Save for RVF with image

General TRichView support forum. Please post your questions here
Post Reply
Ceprotec
Posts: 259
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Save for RVF with image

Post by Ceprotec »

Hello, I'm the following code to save the file in RVF:

Code: Select all

 
TextoConnection := ExtractFilePath(Application.ExeName) + 'Connection.ini';
Arquivo2  := TIniFile.Create(TextoConnection);
Server   := AllTrim(Arquivo2.ReadString('SERVER', 'Server',''));
if (SRichViewEdit1.RichViewEdit.SaveRVF('\\' + Server + '\AtasNotariais\AtaNotarial_' + QueryAtaCODIGO.AsString + '.rvf', false)) = true then
begin
       MessageDlg('salvo', mtWarning, [mbOK], 0);
end
else
       MessageDlg('Erro ao salvar rascunho!'+#13+#10+'Verifique a pasta ''Rascunhos'' no servidor!', mtWarning, [mbOK], 0);
it is recording normally, but not recording the images together if any, to open the text file will only bring

thanks;
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

The most probably, images are stored in RVF file.
But for loading, image class must be registered, such as
RegisterClasses([TGifImage]);

TRichView automatially registers TBitmap, TMetafile, TIcon, TJpegImage.
New version of TRichView also registers TPngImage (in Delphi 2009+) and TWicImage (in Delphi 2010+).

So the only image classes that need to be registered is TGifImage and non-standard classes (such as TPngObject, if you use it)
Post Reply