RichEdit Print / PrintPreview - Append Virtual Lines

General TRichView support forum. Please post your questions here
Post Reply
andyhill
Posts: 28
Joined: Tue May 23, 2006 8:22 pm

RichEdit Print / PrintPreview - Append Virtual Lines

Post by andyhill »

Hi, I have a need to Append Lines to the output on Print and PrintPreview but leave the original rve contents unchanged.

RVPrint1.AssignSource(rve);

add new lines here ?

RVPrint1.FormatPages(rvdoALL);

RVPrint1.Print('', 1, False);

Thanks
Andy
andyhill
Posts: 28
Joined: Tue May 23, 2006 8:22 pm

Post by andyhill »

Inserting other rv data and rtf data would be good to.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Copy rve to some hidden TRichView/TRichViewEdit control, append additional lines to it, then print this hidden control instead of rve.

Code: Select all

var Stream: TMemoryStream;

Stream := TMemoryStream.Create;
try
  rve.SaveRVFToStream(Stream, False);
  Stream.Position := 0;
  rvHidden.LoadRVFFromStream(Stream);
finally
  Stream.Free;
end;
rvHidden.AddNL(Last line', 0, 0);
RVPrint1.AssignSource(rvHidden);
...
Post Reply