procedure TForm1.Button1Click(Sender: TObject);
const
x=2;
y=3;
dx=100;
dy=200;
var
i,j:Integer;
begin
printer.begin
doc;//开始打印
for i:=1 to xdo
begin
for j:=1 to ydo
begin
printer.canvas.textout(x*dx,y*dy,'我的标签');
end;
end;
printer.enddoc;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Bmp: TBitmap;
begin
Bmp := TBitmap.Create;
try
Bmp.LoadFromFile('MyBitmap.bmp');
with Printerdo
begin
begin
Doc;
Canvas.Draw((PageWidth - Bmp.Width) div 2,
(PageHeight - Bmp.Height) div 2,
Bmp);
EndDoc;
end;
finally
Bmp.Free;
end;