Overlay One PDF on Another
Overlaying PDFs stamps the pages of one PDF on top of the pages of another, merging their visible content onto shared pages — this is how letterheads, approval stamps, and background templates get applied to finished documents. This tool takes the first file you choose as the base and stamps the second file over it, page by page, entirely in your browser with no upload. Unlike merging, which places pages one after another, overlaying combines two pages into a single page.
How it works
The mechanism behind overlaying is the PDF form XObject: a self-contained bundle of drawing instructions plus its own fonts, images, and graphics resources, which any page can invoke as a single object. The tool opens the overlay document and converts each of its pages into such an XObject — an operation called embedding — which packages the page's content stream together with everything the stream references. That packaging is what makes the technique robust: the stamp arrives with its own resources and cannot clash with, or depend on, the fonts and images of the base document.
Each base page then gets one extra instruction appended to its content stream: an invocation of the corresponding overlay XObject, wrapped in save/restore graphics-state operators so the stamp's coordinate transformations cannot disturb the base page's own drawing. Because PDF renders content streams strictly in order, appending the invocation after the existing content paints the overlay on top. This ordering explains the one behavior that surprises people: an overlay page containing a filled white rectangle will genuinely cover the base content beneath it, whereas an overlay whose empty areas contain no painting operators at all lets the base show through — PDF pages have no inherent background color; blank means "nothing is drawn," not "white is drawn."
Page pairing is positional. Overlay page 1 stamps base page 1, and so on; when the overlay is a single page — the letterhead and stamp case — the same XObject is referenced by every base page, at nearly zero size cost because the XObject is stored once in the file and merely invoked repeatedly. Sizes need not match: the overlay is placed onto the base page's coordinate space at its original dimensions, so an A4-designed stamp lands on a Letter page 18 points lower relative to the top edge than its designer intended. When precision matters, make both files the same page size.
Worked example: putting a firm's letterhead on a 9-page engagement letter
A law firm has engagement-letter.pdf (9 pages, 142 KB, plain typography with a 2.5 cm top margin) and letterhead.pdf (1 page, 210 KB, containing the firm's logo, address line, and a footer rule, with an empty middle). Selecting the letter first (base) and the letterhead second (overlay), the tool embeds the letterhead as one XObject and invokes it on all nine pages. The output is 348 KB — roughly the sum of the two inputs, not nine letterheads' worth, confirming the single stored XObject. Every page now shows the logo in the top margin and the footer rule below the text; page 6, where a table extends unusually high, shows why designers leave letterhead middles empty rather than white-filled — the table remains fully visible through the letterhead's unpainted center.
Frequently asked questions
Which file is the base and which is the overlay?
The first file you select is the base document; the second file is stamped on top of it. To put a letterhead visually behind your text, the letterhead design must use light colors or leave the text area clear, since the overlay draws over the base.
What happens when the overlay PDF has fewer pages than the base?
A single-page overlay is repeated onto every base page, which is the common letterhead case. If the overlay has several pages, they are applied in sequence until they run out and remaining base pages are left unchanged.
Does a white background in the overlay hide my base document?
It can. If the overlay page paints a solid white rectangle, that rectangle covers the base content. Well-made stamp and letterhead PDFs leave their empty areas genuinely empty, so the base shows through them.
Do the two PDFs need the same page size to overlay?
No, but same-size files line up best. The overlay page is placed onto the base page's coordinate system, so an A4 stamp on a Letter page can sit slightly off from where it was designed to appear.
Is overlaying PDFs the same as merging them?
No. Merging concatenates pages one after another, so the result has the pages of both files in sequence. Overlaying combines two pages into one, with both files' content visible on the same page.
Are the PDFs uploaded anywhere during the overlay?
No. Both files are read and combined by JavaScript running in your browser, and the result is saved directly from memory to your device. Nothing touches a server.