You have assembled a submission from four different sources. It reads correctly and looks like four documents stapled together: no page numbers, no running header, and one landscape page that a reader has to tilt their head for. Fixing that is a small job, and it goes wrong in predictable ways worth knowing in advance.
A page has more than one boundary
A PDF page defines several rectangles, and they are not the same thing.
| Box | What it means |
|---|---|
| MediaBox | The full sheet, the physical paper size |
| CropBox | The region a viewer actually displays |
| TrimBox | The finished page after cutting, for print |
| BleedBox | The area including print bleed |
Almost everything you see is the CropBox. That has one consequence worth stating plainly: cropping a PDF page changes which rectangle is displayed and deletes nothing. The content outside the crop is still in the file, and anyone can restore it by resetting the box.
Where cropping is useful is trimming the wide margins on a scanned book so it reads better on a screen, or normalising a set of pages that came from different sources to the same visible size.
Rotation is a property, not a transformation
Every page carries a /Rotate value of 0, 90, 180 or 270. A viewer applies it when displaying the page. The content underneath is not moved, redrawn or re-encoded.
This explains two things people find strange.
Rotating a page is instant and lossless even on a huge scan, because nothing is being re-rendered. It is a number changing from 0 to 90.
And stamping text onto a rotated page can put it sideways or off the edge, because the stamp is placed in the page's own unrotated coordinate system while you are looking at the rotated result. A tool that handles this correctly compensates for /Rotate; one that does not will produce exactly the wrong result on precisely the pages you rotated.
So the order matters: rotate everything to its final orientation first, then stamp.
Getting the numbering right
Page numbers are stamped as ordinary page content, so a few decisions are worth making before you start.
Do it last. After merging, after reordering, after deleting. Numbering a document and then inserting a page gives you a document that is confidently wrong, which is worse than one with no numbers at all.
Decide where the count starts. Submissions usually want the cover unnumbered and the count starting on the first content page. That means the stamp begins on file page 2 and prints "1", which is two separate settings and the most common thing to get wrong.
Mind the gutter. A number centred at the bottom is safe. A number in the outer corner has to alternate sides on a double-sided document, and a number in the inner corner disappears into the binding.
Leave room. If the source pages already have content near the bottom edge, a stamped number will overlap it. This is where cropping to normalise page sizes first actually helps, because you can see how much margin you have to work with.
The same applies to a header or footer: a document title, a case reference or a confidentiality line running on every page is what makes a stack of merged exports read as one document.
The pages that break
Three positions account for nearly every stamping problem, and checking them takes under a minute.
- The first page. Usually the cover, usually the one that should not be stamped.
- The last page. Often a back cover or an appendix from a different source with a different page size.
- Any landscape page. Different dimensions and probably a
/Rotatevalue, so it is where a stamp lands wrongly if it is going to.
The sequence that works
- Merge everything into one document.
- Reorder and delete until the sequence is final.
- Rotate any sideways pages to their finished orientation.
- Crop to normalise page sizes, if they are inconsistent and it will be printed.
- Add the header, footer and page numbers.
- Compress, if it needs to be smaller.
- Open it and check page one, the last page, and every landscape page.
Compressing at step six rather than earlier matters, because stamping after compression adds new uncompressed content streams to a file you just squeezed.
Work in that order: crop and rotate first so every page has the same shape, then add page numbers and headers or footers, which are positioned relative to the page size and go wrong if it changes afterwards.