2 Replies Latest reply on May 9, 2011 11:04 AM by Haakenlid

    please help!

    heluzion

      Hello,

      i am working with indesign cs5, just made my document with data merge and exorted that in pdf. The pdf contains 65000 pages. The size of a page is 1/4 of a4. I need to put 8 pages of a pdf in a single a3 indesign page, and the same thing with the others. How to do this, help. I tried imposiotion software but no luck. I tried bussines card script but it only place one page and copy that. Can you help me with some script, or plu in or software. Thank you

        • 1. Re: please help!
          Techi Panda Level 2

          Hi Heluzion

           

          Contact me in private,  I can help you

           

          olvela.arul (at) gmail.com

           

          thank you

          • 2. Re: please help!
            Haakenlid Level 3

            I made this js-script to do what you asked for. Change the file names in the first two lines to the names of your documents. targetDocument is the A3-document. sourceDocument is the document you got after the data merge. Only tested in CS3, so there might be some difference in CS5.

             

             

            var targetDocument = app.documents.itemByName ("target.indd");
            var sourceDocument = app.documents.itemByName ("source.indd");
            
            targetDocument.viewPreferences.horizontalMeasurementUnits = sourceDocument.viewPreferences.horizontalMeasurementUnits;
            targetDocument.viewPreferences.verticalMeasurementUnits = sourceDocument.viewPreferences.verticalMeasurementUnits;
            
            var sourcePage, targetPage;
            var columns = Math.ceil(targetDocument.documentPreferences.pageWidth/sourceDocument.documentPreferences.pageWidth);
            var rows = Math.ceil(targetDocument.documentPreferences.pageHeight/sourceDocument.documentPreferences.pageHeight);
            var verticaloffset = (targetDocument.documentPreferences.pageHeight-sourceDocument.documentPreferences.pageHeight)/2
            var columwidth = targetDocument.documentPreferences.pageWidth/columns;
            var rowheight = targetDocument.documentPreferences.pageHeight/rows;
            var page = 1;
            var col = 1;
            var row = 1;
            
            
            for (var n = 0; n < sourceDocument.pages.length; n++){
                 if (col>columns){
                      col = 1;
                      row = row + 1;
                 }
                 
                 if (row>rows){
                      row = 1;
                      page = page + 1;
                 }
            
                 if (page>targetDocument.pages.length){
                      targetDocument.pages.add();
                 }
                 
                 sourcePage = sourceDocument.pages[n];
                 targetPage = targetDocument.pages[page-1];
                 
                 sourcePage.pageItems.everyItem().duplicate (targetPage, [((col-1)*columwidth),((row-1)*rowheight)-verticaloffset])
                 
                 col = col+1;
            }
            

             

            By the way. I found out I had to add a vertical offset to make sure the page items are moved to the correct position in the target document.

            There seems to be some weirdness when duplicating page elements between documents with different page sizes.

             

            var verticaloffset = (targetDocument.documentPreferences.pageHeight-sourceDocument.documentPreferences.pageHeight)/2