Printing of labels
Printing of labels
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...
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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;