Guide
Merging PDFs: Getting the Page Order Right the First Time
Combining PDFs is the simplest operation there is, right up until the output arrives with the appendix in the middle and page 10 sitting between pages 1 and 2. Merging itself rarely goes wrong. Ordering does, and it goes wrong in a small number of predictable ways.
The filename sorting trap
This catches almost everyone once. You have twelve files named page1.pdf through page12.pdf, you select them all, and the result runs 1, 10, 11, 12, 2, 3, 4…
The cause is that filenames are sorted as text, character by character. Reading left to right, "1" comes before "2", so anything starting with 1 sorts ahead of anything starting with 2 — page10 lands before page2 because the comparison is settled at the fourth character and never reaches the rest.
The fix is to pad your numbers to a fixed width: page01, page02, … page12. Now text order and numeric order agree. If you're going past 99 files, pad to three digits. It's worth renaming before you start rather than fixing the order afterwards, especially if you'll repeat the job.
Some file managers are smarter than this — Windows Explorer and macOS Finder both do "natural" sorting that understands embedded numbers. That helps when you're looking at the folder, and it's exactly why the problem is surprising: your file manager shows the right order, then the tool you drop them into uses plain text sorting and produces a different one.
Verify order before merging, not after
The reliable habit is to confirm the sequence at the point where you can still change it cheaply. HerePDF's merge tool lists every file you add as a draggable row showing its name and page count, and merges strictly top to bottom. Drag rows to rearrange, and the page counts give you a quick sanity check: if you expect a 40-page result and the counts sum to 62, something extra crept in before you've produced anything.
Adding files in several passes is fine — new ones append to the end of the list, so you can add the bulk, then drag the odd straggler into place.
Mixed page sizes and orientations
PDF has no requirement that pages within a document share dimensions. Merging an A4 report with a Letter-sized invoice and a landscape spreadsheet gives you one file whose pages are all different shapes — and merging won't warn you, because nothing is technically wrong.
On screen this is mildly untidy. In print it can be a genuine problem: printers handle mixed sizes inconsistently, often scaling everything to the tray's paper and leaving some pages with wide margins and others cropped at the edges.
If the merged document is destined for print, normalise the sizes before merging rather than after — export the odd ones out to a common page size from whatever produced them. Landscape pages are usually best left as they are and rotated for viewing, since squeezing a wide table onto a portrait page rarely improves it. There's more on why this happens in PDF page sizes explained.
What doesn't survive a merge
Page content — text, images, vector graphics — comes through faithfully. What's fragile is anything stored at the document level rather than the page level:
- Bookmarks and outlines belong to the document, not the pages, and are commonly dropped or partially preserved.
- Internal links that pointed to a page in their own document may end up pointing somewhere unexpected once page numbering shifts.
- Form fields with the same name in two source documents collide, and filling one may fill the other.
- Digital signatures are invalidated by definition — a signature attests to a specific document, and the merged file is a different one.
- Metadata comes from one source or is regenerated; author and title from the others are lost.
For a stack of scans or plain reports, none of this matters. For a signed contract or an interactive form, check the result before relying on it.
A workflow that avoids rework
- Rename with zero-padded numbers if the order is numeric. Two minutes here saves the whole problem.
- Fix rotation before merging, not after — turning pages in six separate small files is easier than hunting for them in one large one.
- Add everything, then check the list order and the page counts.
- Merge, then open the result and spot-check the seams — the first page of each source is where ordering mistakes show up.
- If a section landed wrong, re-merge from the sources rather than trying to repair the output. Merging is cheap and non-destructive; your originals are untouched.
And if you merged too much, you don't need to start over — splitting the ranges you want back out is usually faster than reassembling from scratch.