试一试这段代码:注意C:/Program Files/Common Files/Borland Shared/Images/Splash/256color/factory.bmp这一句,看你的图形文件放在什么地方,必须改
procedure TForm1.Button1Click(Sender: TObject);
var
Bitmap:TBitmap;
H,W:integer;//
begin
Bitmap := TBitmap.Create;
try
Bitmap.LoadFromFile('C:/Program Files/Common Files/Borland Shared/Images/Splash/256color/factory.bmp');
finally
Bitmap.Free;
end;
H:=(Printer.PageHeight-Bitmap.Height) div 2;
W:=(Printer.PageWidth-bitmap.Width) div 2;
Printer.begin
Doc;
Printer.Canvas.Draw(W,H,Bitmap);
Printer.EndDoc;
end;