pdftoolskit.org
65 PDF tools that run in your browser
Sign in Create account

Alternate & Mix Two PDFs

front/back scans · reverse the second file · stride option

Scanned the fronts in one pass and the backs in another? This zips the two files together: page 1 from the first, page 1 from the second, page 2 from the first, and so on, with a switch for the case where the backs came out in reverse order. Both files are read and combined in your browser; nothing is uploaded.

Drop exactly two PDFs here

First file = odd pages · second = even pages

    no files
    Ready.

    No PDF handy? Interleave sample-10-pages.pdf with sample-1-page.pdf: the single page lands in position 2 and the rest follow. More free sample files.

    How to interleave two PDFs

    1. Drop the first PDF, the one with the odd pages, typically the fronts of a stack of sheets.
    2. Add the second PDF with the even pages, the backs. The tool needs exactly two files and says so otherwise; swap them with the ↑ and ↓ buttons if they landed in the wrong order.
    3. Set Second file to Reverse it if the backs came out of the feeder last to first, which is what happens when you flip the whole stack and scan again.
    4. Set how many pages at a time to take from each file: 1 for single sheets, 2 when each unit is a pair of pages.
    5. Click "Interleave" and check that pages 1 and 2 of the result are the front and back of the same sheet before you throw the paper away.

    The duplex-scanner problem

    A single-sided sheet feeder gives you two files: odd pages in order, and even pages in whatever order the stack came out. Flip the pile and feed it again and the backs arrive last to first, so page 2 of the document is the last page of the second file. That is what Reverse it is for: turn it on and the interleave counts the second file backwards.

    If your scanner produced the backs in forward order, leave it off. One run tells you which: check whether page 2 of the output is the back of page 1.

    Uneven page counts

    The files do not have to be the same length. When one runs out, the remaining pages of the other are appended in order, which is right for a document with an odd number of sheets, where the last back is blank and was never scanned. The status line reports both page counts.

    The stride option

    Normally one page is taken from each file in turn. A stride of 2 takes two from the first, then two from the second, and so on, up to 10. That suits a scan where each unit is a two-page spread. If you are not sure, leave it at 1.

    What comes out

    One file named after the first input with -interleaved added. Pages are copied between documents as objects, so their content, size and annotations are untouched and nothing is recompressed. The result is a new document: bookmarks, the title and author fields, attachments and the form dictionary are not carried over. The same file can be dropped twice, so a document can be interleaved with itself.

    FAQ

    Which file should I add first?

    The one with the odd pages, the fronts. The output starts with its first page. The file list shows the order and the ↑ and ↓ buttons swap them.

    How do I know whether to reverse the second file?

    Run it once and look at page 2 of the result. If it is the back of page 1, you are done. If it is the back of the last page, set Reverse it and run again.

    What if one file has more pages?

    The leftovers are appended at the end in order. Nothing is dropped.

    Does it re-compress anything?

    No. Pages are copied between documents, so image quality and text are unchanged. Bookmarks and metadata are not copied, since the output is a new document.

    What about an encrypted PDF?

    pdf-lib copies pages without decrypting them, so the output has blank pages, even for a file that opens without a password but restricts printing or copying. Run it through Unlock PDF first.

    Related tools

    Part of: Digitise a scanned book

    Interleave before you split: a two-pass scan of spreads has to be in reading order before each spread is cut into two pages.

    1. 1 Interleave Two PDFs Zip the front pass and the back pass into one ordered file
    2. 2 Split PDF Pages in Half Cut each two-page spread into two single pages at the gutter
    3. 3 Auto-Crop PDF Margins Remove the black scanner border around every page
    4. 4 Remove Blank PDF Pages Drop the blank leaves between chapters
    5. 5 PDF Bookmark Editor Add a chapter outline so the sidebar is navigable
    6. 6 PDF OCR Make the text selectable and searchable

    This workflow, start to finish · all 20 workflows