用copyrect拷贝到printer的canvas上.
//add Printers unit to the uses
procedure TForm1.Button1Click(Sender: TObject);
var
BitMap1 : TBitMap;
rectd,rects:trect;
begin
BitMap1 := TBitMap.Create;
//这里假设你选取的目标区域是(selectstartx,selectstarty)-(selectendx,selectendy)的矩形
rectd:=rect(0,0,(selectendx-selectstartx),(selectendy-selectstarty));
rects:=rect(selectstartx,selectstarty,selectendx,selectendy);
try
BitMap1.LoadFromFile('c:/test.bmp');
with Printerdo
begin
begin
Doc;
CopyRect(rectd,bitmap1.canvas,rects);
EndDoc;
end;
finally
BitMap1.Free;
end;
end;