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
RichEdit Print / PrintPreview - Append Virtual Lines
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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);
...