You can apply three geometry operations to PDF pages. If all three operations are to be applied, the order in which the operations are performed is offsets, scaling, and orientation/rotation, as illustrated here:
- Offsets are applied first.
For example here a page is offset 1 inch in both x and y directions. - Scaling is next, including the same offset amounts as above.
The following page is scaled by 50 percent. The scaling is applied to both the page and the offset amounts. The offsets are now 0.5 inches. - Rotation is last, including the same offset and scale as above.
The following rotation is applied around the lower-left corner of the page after the offset and scaling. This means the rotation happens 0.5 inches down and left from the original page corner. Thus the original content can actually end up imaging outside the new page boundary as shown in the diagram.
90 degrees CW
180 degrees
90 degrees CCW