4 Replies Latest reply on Jan 19, 2016 6:58 AM by Trevorׅ

    Indesign CS6: moving pages to another doc creates a megaspread

    nagytomi

      Hi friends,

       

      I'm trying to merge many docs into one at my workplace in Indesign CS6. In the script first I ask the user to select the docs to merge, than I tell Indesign to open all selected docs one by one and duplicate all the pages in them to the end of another (previously opened) doc1.

      The code is something like this:

       

      var myDoc1=app.activeDocument;

      var myDoc2= <one of the selected docs, already opened at this point>;

      <code to override and detach master page elements in myDoc2>

       

      var sourcePages=myDoc2.pages.everyItem();

      sourcePages.duplicate(LocationOptions.AFTER, myDoc1.pages.item(-1));

       

      It's okay, all pages go to the end of doc1 but they form a single spread. If the user selects 10 docs, all with 12 pages in them, than in Doc1 I get a gigaspread with 10x12=120 pages.

      No matter how many Sections were in the source, sections remain valid in doc1, but within this wiiiiideeee spread.

       

      Pls tell me how could I make Indesign to keep the spread structure of the original source docs! I cannot find any parameter or option to regulate this behaviour.

       

      Thx and best,

      Tamas