Printing of labels

General TRichView support forum. Please post your questions here
Post Reply
markkuin2
Posts: 10
Joined: Tue Sep 06, 2005 9:57 am

Printing of labels

Post by markkuin2 »

I use the richview component to print labels with customer data. I do this by creating a layout which is small enough to fit on one label. I modified the component to be able to print more then one document on a single page (by adjusting the left, right, top and bottom margin in the TPrintableRVData.Prepare procedure, depending on the position of the label). My question is: is it possible to incorporate such functionality in the package? Maybe more people are interested in it. My problem now is that when a new Richview version releases, I need to insert my changes with the risk of inserting bugs...
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Actually, the possibility of printing several documents on one page already exists (but not documented):

Code: Select all

Printer.BeginDoc;
RVPrint.StartAt := 0;
RVPrint.TransparentBackground := True;
RVPrint.AssignSource(RichView1);
RVPrint.FormatPages(rvdoALL);
RVPrint.ContinuousPrint;
RVPrint.StartAt := RVPrint.EndAt;
if RVPrint.rv.Height-RVPrint.StartAt<some safe value then
begin
  Printer.NewPage;
  RVPrint.StartAt := 0;
end;
RVPrint.AssignSource(RichView2);
RVPrint.FormatPages(rvdoALL);
RVPrint.ContinuousPrint;
Printer.EndDoc;
Post Reply