Page 1 of 1

Loading RichView with Footer?

Posted: Thu Dec 07, 2006 9:31 am
by Crowbar
Hi,
i would like to loading the content of Printpreview (with Footer) in the RichView.
That's ok, but why will be loading the Richview without Footer?

It is possibly the total content of Printpreview (with Footer) to loading in the RichView?

Code: Select all

...
Var
 ms : TMemoryStream;

begin
  ms:=TMemoryStream.Create;
  try
   PVPrintPreview.RVPrint.SavePageAsRVF(ms,1);
   ms.Position:=0;
   RichView1.Clear;
   RichView1.LoadRVFFromStream(ms);
   RichView1.Format;
  finally
   ms.Free
  end;
end;
...
Regards
Crowbar

Posted: Thu Dec 07, 2006 1:38 pm
by Sergey Tkachenko
Is your footer a formatted document (in RVF format), or a plain text?

Posted: Thu Dec 07, 2006 2:10 pm
by Crowbar
Hi,
my footer is a formated document (in RVF format).

Code: Select all

RVPrint1.SetFooter(FootRichViewEdit.RVData);

Posted: Sat Dec 09, 2006 12:19 pm
by Sergey Tkachenko
Current version does not allow saving multiple documents in one RVF file.
You need to implement it yourself.
Possible solution:
- invent you own file format containing several RVF documents
- save the footer document in the DocProperties property of the main document.

DocProperties is a collection of text strings. Line break characters are allowed, but binary content is not. So you need to exclude rvfoSaveBinary from FootRichViewEdit.RVFOptions. After that, you can save it content to TStringStream and add its string to DocProperties.

Posted: Sun Dec 10, 2006 1:07 pm
by Crowbar
Hi,
is planned in the future of version, that the function "PVPrintPreview.RVPrint.SavePageAsRVF" save all ... with the "Footer" (and "Header") too?

Regards
Crowbar

Posted: Mon Dec 11, 2006 8:48 pm
by Sergey Tkachenko
Probably