And if the code above is not enough, then you probably should retrieve DEVMODE data for your printer through GetPrinter function and PRINTER_INFO_2 structure.
The DEVMODE structure contains such members as:
short dmPaperSize;
short dmPaperLength;
short dmPaperWidth;
short dmScale;
...