既然问题的分类是:Windows API,我就用API来解决:<br><br>// 纸张改为 A4<br>uses WinSpool;<br>procedure TFrom1.PreparePrinter;<br>var<br> hPrinter: THandle;<br> PrtInfo: PPrinterInfo1;<br> DevMode: PDeviceMode;<br> pcbNeeded, PDevModeBytes: DWORD;<br>begin<br> OpenPrinter('Epson LQ-1600K', hPrinter, nil);<br> GetMem(PrtInfo, 1024);<br> GetPrinter(hPrinter, 1, PrtInfo, 1024, @pcbNeeded);<br> PDevModeBytes := DocumentProperties(Handle, hPrinter, PrtInfo^.pDescription, DevMode^, DevMode^, 0);<br> GetMem(DevMode, pDevModeBytes);<br> DocumentPropertied(Handle, hPrinter, PrtInfo^.PDescription, DevMode^, DevMode^, DM_OOT_BUFFER);<br> DevMode^.dmPaperSize := DMPAPER_A4;<br> DevMode^.dmFields := DevMode^.dmFields or DM_PAPERSIZE;<br> DocumentProperties(Handle, hPrinter, PrtInfo^.PDescription, DevMode^, DevMode^, DM_IN_BUFFER);<br> FreeMem(PrtInfo);<br> FreeMem(DevMode);<br>end;