Loading RichView with Footer?

General TRichView support forum. Please post your questions here
Post Reply
Crowbar
Posts: 82
Joined: Wed Oct 11, 2006 8:54 pm
Location: Germany

Loading RichView with Footer?

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

Post by Sergey Tkachenko »

Is your footer a formatted document (in RVF format), or a plain text?
Crowbar
Posts: 82
Joined: Wed Oct 11, 2006 8:54 pm
Location: Germany

Post by Crowbar »

Hi,
my footer is a formated document (in RVF format).

Code: Select all

RVPrint1.SetFooter(FootRichViewEdit.RVData);
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Crowbar
Posts: 82
Joined: Wed Oct 11, 2006 8:54 pm
Location: Germany

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

Post by Sergey Tkachenko »

Probably
Post Reply