How to set the paper size using the WinSpool API?
问题 I can't use the XPS API since the program has to be able to print on Windows XP. I'm trying to set the paper size from Letter to A4 using WinSpool. This is my test code: var H : THandle; I : TBytes; Info : PPrinterInfo2; NeededSize : DWORD; DevMode : PDeviceMode; PD : TPrinterDefaults; begin PD.pDatatype := nil; PD.pDevMode := nil; PD.DesiredAccess := PRINTER_ACCESS_ADMINISTER; if not OpenPrinter('Brother HL-5350DN series Printer', H, @PD) then begin raise Exception.Create('OpenPrinter error: