Why is this page rotated?
By Anton Samper · Reviewed
Both pages contain sideways text, but their page rotations differ. The first inherits a 90-degree page rotation. The second has a zero-degree page rotation and turns part of its content with a drawing matrix.
Open this exampleDownload sample PDF
1. Find the inherited rotation
The document overview reports mixed page rotation. Choose First page, object 3 0 R. There is no /Rotate entry. Follow /Parent to 2 0 R and find /Rotate 90. The page inherits this value, which turns the displayed page clockwise.

2. Check the second page's override
In Pages, select page 2, object 4 0 R. It has /Rotate 0, overriding the parent's value. Preview this page: its heading is upright, though the words “Content stream rotation” run vertically. A zero page rotation does not mean every mark is upright.
3. Read the content transform
Follow the second page's /Contents to 6 0 R. In Decoded → Decoded byte text, find:
q
0 1 -1 0 450 80 cm
BT /F1 24 Tf 0 0 Td (Content stream rotation) Tj ET
QHere the matrix rotates the text 90 degrees anticlockwise and positions it on the page. The surrounding q and Q save and restore graphics state, so this transform does not affect the earlier heading.
Choose which rotation to change
For a whole page displayed at the wrong angle, check its effective /Rotate, including inherited values. For one sideways item on an otherwise upright page, inspect the transforms in its content stream. Change the responsible value in your generator; PDF Internals does not edit the file.