pageToDeviceBase
The unscaled user-space -> device base transform, with the device origin at the top-left and y growing downward. The resulting device box is [0, rotatedWidth] x [0, rotatedHeight]. Compose additional scaling on top of this to fit a target surface.
Verified against pdf.js viewport math for Matrix(a, b, c, d, e, f).