When I print 142 labels (3 x 8 pieces on one sheet) it has to be 6 pages (2 labels left). But in preview and on paper only 4 pages are produced - and the 2nd and the 3rd page are used 2 times.
Is this a mistake of me ??!
This is my code:
Code
procedure TEditEtik.PrintPatiLabels(PKSt_Filename: string);
var
LSt_PatiKz: PatiKrzKey_Typ;
LB_FirstTime: boolean;
begin
LB_FirstTime := true;
RT_TLabelWork := TWPRichText.create(self);
RT_TLabelWork.LoadFromFile(PKSt_Filename);
RT_TLabelWork.OnMailMergeGetText := RT_TLabelMailMergeGetText;
if not LstEmpty(GP_List) then
begin
LstGoFirst(GP_List);
while not LstOffPos(GP_List) do
begin
LstGetVal(GP_List, Lst_PatiKz);
D.ReadDB(D.DA_Pati, LSt_PatiKz, 'TEditEtik.PrintLabels');
RT_TLabelWork.MergeText;
if LB_FirstTime then
begin
LB_FirstTime := false;
RT_TLabel.AsString := RT_TLabelWork.AsString;
end
else
begin
RT_TLabel.CPPosition := MaxInt;
RT_TLabel.FastAppendText(RT_TLabelWork,True,[wpCreateNewPage]);
end;
LstGoNext(GP_List);
end;
end;
RT_TLabel.InsertpointAttr.Hidden := True;
RT_TLabel.ShowMergeFieldNames := false;
RT_TLabel.Refresh(False);
ShowModal;
end;
Alles anzeigen
I could show you the result of this code as a pdf-file, but I don't know how to upload this to you.