试试这个函数:
Procedure PRT_SET(P_Size,P_Orientation:Shortint);
Var
APrinterName,APrinterDriver,APrinterPort : Array[0..255] of Char;
AHnd : THandle;
ADevMode : PDevMode;
begin
Printer.GetPrinter(APrinterName,APrinterDriver,APrinterPort,AHnd);
ADevMode := GlobalLock(AHnd);
Try
AdevMode^.dmPaperSize := P_Size;
AdevMode^.dmScale := 100;
AdevMode^.dmPrintQuality := DMRES_MEDIUM;
AdevMode^.dmOrientation := P_Orientation;
Finally
GlobalUnlock(AHnd);
end;
Printer.SetPrinter(APrinterName,APrinterDriver,APrinterPort,AHnd);
end;