This appears to be regression in Qt5.9 since it's working fine in Qt 5.8.
Steps to reproduce the issue.
1. In the attached test application, change the printer name to match some of the non-default system printers e.g. "Send to Onenote 2017"
2. Check from system printer preferences that the pagesize is different than for the system default printer.
3. Run attached test application
4. Observe the printed pagesize name.
The printer.pageLayout().pageSize().name() is always the same as the default printer pagesize name.
The pagesize name should be following the actual page size name set in the system printer setup.