In QMacPrintEnginePrivate::paperSize() the printer's paper size
is converted to mm (rounded up) and compared to the values stored in
qt_paperSizes by calls to qt_paperSizeToQSizeF().
This is a broken concept, because in other places qSizeFTopaperSize()
is used to determine the PaperSize from a given QSizeF, and there
a tolerance of +/-1mm is allowed.
What happens under Mac OS X 10.6.2 with the "HP Laserjet 5100 Series"
driver is that in one place the page size is detected as
being, e.g., Letter, while in another place it is considered Custom.
Since there is no custom page size stored, applications then fail
because they get a custom page size of (-1, -1).