3 Replies Latest reply on Dec 17, 2013 7:49 PM by Mi_D

    How to use the script placemultipagePDF with reduction?

    MarthaR

      In need to use the script placemultipagePDF, but in need this have a reduction 77%

        • 1. Re: How to use the script placemultipagePDF with reduction?
          Laubender Adobe Community Professional & MVP

          @Martha – I do not know that script, but maybe you could use Scott Zanelli's "MultiPageImporter2.5.jsx"-script?

           

          See:

           

          http://indesignsecrets.com/zanelli-releases-multipageimporter-for-importing-both-pdf-and-i ndd-files.php

           

          Zanelli-ImportMultiPagePDF-Screen.png

           

          You could scale to 77% while placing (importing) the PDF pages.

          What exact version of InDesign, what exact version of OS do you use?

           

          Uwe

          • 2. Re: How to use the script placemultipagePDF with reduction?
            MarthaR Level 1

            I use cs6 and and OS X (10.7.5)

            • 3. Re: How to use the script placemultipagePDF with reduction?
              Mi_D Level 3

              try below code, i modifide sample cone provide adobe as per ur requirement.

               

              main();

              function main(){

                  //var myCounter = 1;   

                  var myDocument = app.documents.item(0);

                  var myPage = myDocument.pages;

                  var myPDFFile = new File("E:\\Work\\Scripting InDesign CS3-4 with JavaScript April 2009.pdf");

                      if((myPDFFile != null)){

                          for (var p=0; myPage.length>p; p++){

                      myPlacePDF(myDocument, myPage[p], myPDFFile);

                      }

                      }

              }

              function myPlacePDF(myDocument, myPage, myPDFFile){

                  var myPDFPage;

                  app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;

                  var myCounter = 1;

                  var myBreak = false;

                  while(myBreak == false){

                      if(myCounter > 1){

                          myPage = myDocument.pages.add(LocationOptions.after, myPage);

                      }

                      app.pdfPlacePreferences.pageNumber = myCounter;

                      myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];

                      myPDFPage.verticalScale =77;

                      myPDFPage.horizontalScale = 77;

                     

                      if(myCounter == 1){

                          var myFirstPage = myPDFPage.pdfAttributes.pageNumber;

                      }

                      else{

                          if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){

                              myPage.remove();

                              myBreak = true;

                          }

                      }

                      myCounter = myCounter + 1;

                  }

              }