Skip to main content
Participant
April 15, 2025
Question

How do I export single pages to duplicated spreads as a pdf

  • April 15, 2025
  • 3 replies
  • 1010 views

I have an 80 page 8.5 x 11 document that I want to export as 80 pages that are 17 x 11, with duplicates of each page showing side by side. So the first spread would be page 1 next to page 1, the second spread would be page 2 next to page 2, etc.

I have attached a 10 page document as a test file.

3 replies

m1b
Community Expert
Community Expert
April 15, 2025

Hi @jdg789456123 I was thinking along the same lines as @Luke Jennings3. I've written a quick script that does (I think) what you describe. See if it helps.

- Mark

 

/**
 * @file Double Place Active Document.js
 *
 * Imports the active document into a new document,
 * placing each page twice per spread.
 * 
 * Note: does not alter the active Document.
 *
 * @author m1b
 * @version 2025-04-16
 * @discussion https://community.adobe.com/t5/indesign-discussions/how-do-i-export-single-pages-to-duplicated-spreads-as-a-pdf/m-p/15269931
 */
function main() {

    if (0 === app.documents.length)
        return alert('Please open a document and try again.');

    var doc = app.activeDocument;

    if (!doc.saved)
        return alert('Please save document and try again.');

    // set up a new doc, based on the active one
    var doubleDoc = app.open(doc.fullName, true, OpenOptions.OPEN_COPY);

    doubleDoc.documentPreferences.properties = {
        allowPageShuffle: false,
        createPrimaryTextFrame: false,
        preserveLayoutWhenShuffling: true,
        facingPages: false,
    };

    // with none of the original pages
    doubleDoc.spreads.add(LocationOptions.AT_END, doubleDoc, { appliedMaster: null });
    doubleDoc.pages.itemByRange(0, -2).remove();

    // and only one layer
    while (doubleDoc.layers.length > 1)
        doubleDoc.layers[-1].remove();

    var layer = doubleDoc.layers[0];
    layer.visible = true;
    layer.locked = false;

    app.importedPageAttributes.importedPageCrop = ImportedPageCropOptions.CROP_CONTENT;

    var placingEachPage = true,
        docSpreadCounter = 0,
        imageSpreadCounter = 0,
        firstImagePageNumber = 1,
        spread,
        firstPage,
        secondPage,
        placedItem;

    while (placingEachPage) {

        app.importedPageAttributes.pageNumber = imageSpreadCounter + 1; // 1-based

        spread = doubleDoc.spreads[-1];
        firstPage = spread.pages[0];
        placedItem = firstPage.place(/* file */doc.fullName, /*placePoint*/undefined, /*destinationLayer*/layer, /*showingOptions*/false, /*autoflowing*/false, {})[0];

        if (
            imageSpreadCounter > 0
            && placedItem.pdfAttributes.pageNumber == firstImagePageNumber
        ) {
            // no more pages to import, so it gave us the first one again
            // which we don't want, so clean up and we're finished placing pages
            placedItem.parent.remove();
            spread.remove();
            break;
        };

        docSpreadCounter++;
        imageSpreadCounter++;

        // add a second page to the spread, and duplicate the first page to it
        spread.allowPageShuffle = false;
        secondPage = doubleDoc.pages.add(LocationOptions.AT_END, spread, { appliedMaster: null });
        placedItem.duplicate(secondPage);

        // get ready for the next spread
        doubleDoc.spreads.add({ appliedMaster: null });

    }

};
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Double Place Document');

Edit 2025-04-16: fixed bug didn't handle facing pages correctly.

Robert at ID-Tasker
Legend
April 15, 2025

@m1b

 

It's about placing twice on the same, wider page - not on two pages on the same spread.

 

m1b
Community Expert
Community Expert
April 15, 2025

@Robert at ID-Tasker Yes I know, but this way might be neater, and just export spreads. Anyway, it's very easy to change to the other way.

Robert at ID-Tasker
Legend
April 15, 2025

@jdg789456123

 

Can't check your file, but i think I understand what you need.

 

If you want to do it in the InDesign, you'll need: 

 

1) export your original document as single page  PDFs, 

2) create 17x11 INDD document, 

3) use ImageCatalog script twice - with an extra shift / left margin for the 2nd run to place 2nd copy of the pages.

 

Luke Jennings3
Community Expert
Community Expert
April 15, 2025

Download and install the Multipageimporter script, hopefully it's still here:

https://community.adobe.com/t5/indesign-discussions/importing-multipage-pdf-indesign/m-p/13096715

Duplicate your InDesign file, delete all but page one, change the document setup to 17 x 11*

Go to Window> Utilities> Scripts> Multipageimporter> run the script (from the little fly-out menu).

Select your original InDesign file as the file to place, do this twice, offsetting the second place by 8.5".

*by duplicating the original InDesign file, as opposed to starting from a new file, you will retain any type preferences that could otherwise cause issues, also, any changes to the original file will appear on the new spread pages.

Robert at ID-Tasker
Legend
April 15, 2025
quote

[...]

*by duplicating the original InDesign file, as opposed to starting from a new file, you will retain any type preferences that could otherwise cause issues, also, any changes to the original file will appear on the new spread pages.

 

By @Luke Jennings3

 

It doesn't work that way - if you duplicate INDD file - you're creating completely independent entity - in no way linked to the original INDD file - not affected by updates to the contents / formatting in the current file.

 

Page from the placed INDD file is treated the same way as if you would place PDF file - even if you change color of the font in the current file - it won't affect contents of the page placed from the duplicated INDD page:

 

 

On the right - page placed from the duplicated INDD file - copy of the INDD file placed back into.

 

Community Expert
April 15, 2025

I am not sure if this can be done natively. Maybe a script would be needed for this. Something similiar done using an Acrobat script is discussed in the post linked below

https://community.adobe.com/t5/acrobat-discussions/script-to-duplicate-certain-pdf-page-between-each-pages/td-p/14824618

-Manan

-Manan