以下函式可以用來選擇紙張尺寸及列印方向: {DMPAPER_LEGAL, DMPAPER_LETTER, DMPAPER_A3; DMPAPER_A4, DMPAPER_A5, DMPAPER_LETTER} {DMORIENT_LANDSCAPE, DMORIENT_PORTRAIT} procedure SetPaper(Printer: TPrinter; Paper, Orient: smallint ); var {$IFDEF Win32} FDevMode: PDeviceModeA; {$ELSE} FDevMode: PDevMode; {$ENDIF} FDevice, FDriver, FPort : Array[0..255] of Char; FHandle : THandle; begin Printer.GetPrinter (FDevice, FDriver, FPort, FHandle ); Printer.SetPrinter (FDevice, FDriver, FPort, FHandle ); if FHandle = 0 then begin Printer.PrinterIndex := Printer.PrinterIndex; Printer.GetPrinter (FDevice, FDriver, FPort, FHandle ); end; if FHandle = 0 then Exit; CurrPaperSize:= Paper; CurrPaperOrient:= Orient; // this is where the orientation gets set {$IFDEF WIN32} FDevMode:= GlobalLock(FHandle); {$ELSE} FDevMode:= Ptr(FHandle, 0); {$ENDIF} with FDevMode^ do begin dmPaperSize:= Paper; dmOrientation:= Orient; dmFields:= dmFields or DM_PAPERSIZE or DM_ORIENTATION or DM_COPIES; end; {$IFDEF WIN32} if FHandle <> 0 then GlobalUnLock(FHandle); {$ENDIF} end; Good luck, Jeff Rafter Realsoft Development