Hi All
I can use the Qr code component to print individual labels on a label printer or receipt printers.
What I now need to do it print a whole bunch of different QR codes on a receipt.
Its just a simple loop from a listbox but I have always used a command to set up a RECT to allow the placement of the barcode, bit this command seems to cause problems:
Barcodeqr1.PaintOnCanvas(printer.Canvas,myrect);
The command works perfect if you print one receipt or one label , then do the printer.enddoc, then print a new receipt/label.
To do that in a loop i tried:
l:= 20;
t:= 50;
for i := 0 to ListBox1.Items.Count - 1 do
begin
w:=barcodeqr1.Width;
h:=barcodeQR1.Height;
myrect:=rect(l,t,w,h);
Printer.BeginDoc;
barcodeqr1.Text:=listbox1.Items[i];
barcodeqr1.Scale:=5;
Barcodeqr1.PaintOnCanvas(printer.Canvas,myrect);
inc(t,100);
end;
printer.EndDoc;
That causes an error of 'PRITER IS PRINTING' but it doesnt print.
It would seem that command cannot be put in a loop with the printer.
Anyone here perhaps knows how to correct that?
-Regards,
Peter