My PDF has landscape spreadsheet pages; will the page numbers come out sideways or in the wrong spot on them?

No. The tool works out where the number goes on the page as the reader sees it, taking the page's rotation and crop box into account, so if you choose bottom right the number appears at the visible bottom right of the landscape page and reads upright. The one condition is that the page itself displays the right way round before you number it.

Published · 3 min read

Why people worry about this

A landscape page in a PDF can be made in two ways. One is a page that is simply wider than it is tall. The other is a portrait page carrying a rotation flag that tells the reader to show it sideways. In the second case, a naive tool writes the number at the 'bottom' of the page as stored in the file, and the reader sees it on the side of the page, turned by a right angle. Plenty of people have seen exactly that from other tools.

What this tool does

PDF page numbering reads each page's rotation and crop box, works out the position on the visible page, converts it into file coordinates, and turns the text by the same angle so it stays upright. The result is the same in both cases: the number lands where you chose and reads without tilting your head.

In numbers: a landscape A4 page has a visible size of 841.89 × 595.28 points. With Bottom, Right and the default 10 mm margin, the number is anchored 813.54 points from the left and 28.35 points up, right-aligned. On a portrait page in the same file the anchor sits at 566.93 points from the left, so each page is worked out from its own visible size.

When the number really does look odd

When the page itself displays wrongly. If you open the file and a table shows sideways so you have to tilt your head, the tool numbers the page as displayed: the number is upright relative to the page but out of line with the table. The fix:

  1. Correct the sideways pages first with Rotate PDF pages, so every table reads normally.
  2. Open the corrected file in the numbering tool.
  3. Choose the position and format, then press Add numbers.
  4. In the preview, check one portrait and one landscape page to make sure the number sits in the same relative spot on both.

Notes for mixed files

  • With Center, the number sits in the middle of each page's visible width, so it is centred on the landscape page, not where the portrait centre would be.
  • Mirror the side on even pages works on landscape pages too, based on their position in the file.
  • The tool does not inspect page content, and landscape spreadsheets often run close to the edges. If the number lands on the last row, increase the margin.

Common questions

Does numbering change page orientation?

No. Numbering only adds text and changes neither the rotation nor the size of any page.

What about pages whose edges were cropped?

The position is worked out inside the crop box, the area the reader actually sees, so the number never lands in a hidden strip.