πŸ”€

Alternate Merge

Interleave pages from two PDFs alternating sides. Useful for creating print-ready booklets.

Alternate Merge

Merge two PDFs by alternating their pages β€” perfect for front/back double-sided scans.

PDF A β€” Pages 1, 3, 5…

Drop PDF A

Front pages

PDF B β€” Pages 2, 4, 6…

Drop PDF B

Back pages

Combine Front and Back Scans Into Correct Reading Order

You scanned a 20-page double-sided document with an auto-feed scanner. The fronts went into one PDF (odd pages 1, 3, 5, ... 19) and the backs into another (even pages 2, 4, 6, ... 20). Now you have two files that need to become one document in the right sequence. Drop both PDFs into the alternate merge tool, verify the preview shows A1, B1, A2, B2, ... and click Merge and Download.

The tool supports two merge orders (A-first or B-first) and two length-handling modes. When both PDFs have the same page count, the interleaving is straightforward. When they differ -- say PDF A has 15 pages and PDF B has 12 -- you choose whether to append the remaining 3 pages from A or truncate to the shorter document. A live preview of the first 10 pages shows colour-coded borders (blue for A, green for B) so you verify the pattern before downloading.

Common scenarios for alternate merging

Double-sided scan reassembly

A 30-page contract scanned with a Fujitsu ScanSnap produces two PDFs: one with odd pages (fronts) and one with even pages (backs). The alternate merge combines them into A1, B1, A2, B2, ... A15, B15. The preview shows the first 10 interleaved pages so you confirm the pattern before downloading.

Parallel document comparison

An original report (PDF A) and its revision (PDF B) are interleaved into a single document. Each original page is followed by its revised counterpart, making side-by-side comparison straightforward when printed in duplex or viewed in two-page spread mode.

Deck and handout assembly

A presentation has content slides (PDF A) and speaker notes (PDF B). The alternate merge interleaves them so each content page is followed by its corresponding notes page. The B-first option places notes before content when the supplementary material should appear first.

How the Interleave Algorithm Builds the Merged Page Sequence

The tool loads both PDFs and builds a page index array by alternating between them. For A-first order with a 10-page PDF A and an 8-page PDF B, the algorithm produces: A1, B1, A2, B2, A3, B3, A4, B4, A5, B5, A6, B6, A7, B7, A8, B8, A9, A10. The last two pages from A are appended because B ran out first.

Append versus truncate mode

In append mode (the default), the algorithm iterates up to the maximum page count of either document. At each index, it adds a page from PDF A (if that index exists in A) followed by a page from PDF B (if that index exists in B). Excess pages from the longer document appear at the end. In truncate mode, the algorithm iterates only up to the minimum page count, discarding excess pages from the longer document entirely.

For a concrete example: PDF A has 20 pages, PDF B has 15 pages. In append mode, the output is 35 pages (A1-B1 through A15-B15, then A16-A20). In truncate mode, the output is 30 pages (A1-B1 through A15-B15). The append mode is correct for double-sided scans where the front PDF may have one extra page if the document has an odd total page count.

How the preview works

When both files are loaded, the tool generates thumbnails of the first 10 interleaved pages. For each page in the index array, PDF.js renders a thumbnail at 20% scale. Blue-bordered thumbnails represent pages from PDF A, green-bordered thumbnails represent pages from PDF B. The source label (A1, B1, etc.) appears below each thumbnail. Changing the merge order or length mode updates the preview in real time.

Pages are copied byte-for-byte from the source documents using copyPages(). Text, images, vectors, bookmarks, and annotations transfer without modification. The merge changes only the page sequence -- nothing on any individual page is altered. The output file size is approximately the sum of both input files.

Frequently Asked Questions

What is alternate merge used for?

The most common use is combining front and back scans from a double-sided document. When you scan the fronts into one PDF and the backs into another, alternate merge interleaves them into correct reading order: A1, B1, A2, B2, ... It also works for parallel document comparison, combining content with speaker notes, or any scenario where two page sequences need to be woven together.

What if the PDFs have different numbers of pages?

In append mode (default), the extra pages from the longer PDF are added at the end. For example, if A has 15 pages and B has 12, the output is A1-B1 through A12-B12, then A13-A15. In truncate mode, both PDFs are cut to the length of the shorter one, so the output is A1-B1 through A12-B12 only.

Are my files uploaded to a server?

No. All processing happens in your browser. Your files never leave your device -- there is no server upload. This matters for confidential documents like legal filings or financial statements.

Does interleaving reduce PDF quality?

No. Pages are copied byte-for-byte from both source documents -- text, vectors, images, and fonts transfer without re-encoding. The merged PDF has exactly the same visual quality as the originals. The operation changes only the page sequence.

Can I merge more than two PDFs?

This tool is designed for interleaving exactly two PDFs. To merge more than two, use the standard PDF Merge tool for sequential concatenation, or use this tool in multiple passes -- first merge two files, then merge the result with the third.

What is the difference between A-first and B-first order?

A-first (A, B, A, B, ...) places a page from PDF A first, then B, alternating. B-first (B, A, B, A, ...) places B first, then A. Choose B-first when the back pages (PDF B) should appear before the front pages in the merged output.

Can I preview the result before downloading?

Yes. The tool shows the first 10 interleaved pages with colour-coded borders (blue for A, green for B). The source label (A1, B1, etc.) appears below each thumbnail. Changing the merge order or length mode updates the preview immediately.

mergealternateinterleavepdffront backscan

More Tools You Might Like

πŸ“„Merge PDF
βœ‚οΈSplit PDF
πŸ—‚οΈOrganize PDF
πŸ—‘οΈDelete Pages
πŸ”„Rotate PDF
πŸ”ƒReverse Pages