6 Replies Latest reply on Nov 6, 2009 5:21 AM by Oviya...

    import pdf into indesign

    Oviya... Level 1



      i want to import pdf into indesign through script. That will select the pdf on verso pages alone with supplied input value and align


      the pdf accordingly. it should not touch recto page.


      verso side values


      x-axis 0p2

      y-axis 0p1.2



      Here i attacehd my script


      var OriginPoint=new Array();


        myFileName=File.openDialog("Choose a PDF File");
        if(myFileName == null){
           alert("Select a PDF file to Import!");


          myInDesign.pdfPlacePreferences.pdfCrop = PDFCrop.cropContent;
          myCounter = 0;
          myBreak = false;
          while (myBreak ==false){
              if (myCounter > 0){
              app.pdfPlacePreferences.pageNumber =PDFpg;
                if(myCounter == 0){
               myFirstPage = myPDFPage.pdfAttributes.pageNumber;
                  if (myPDFPage.pdfAttributes.pageNumber ==myFirstPage){
                      alert("All pages in the pdf document are imported!");
                      myBreak = true;

        • 1. Re: import pdf into indesign
          [Jongware] Most Valuable Participant

          What is the problem?

          • 2. Re: import pdf into indesign
            Oviya... Level 1

            HI john,


            Thanks for ur reply


            Actulay i import pdf into my indesign document. i want to use UI to set recto and verso x & y axix values. if i enter x&y for recto pages. i want to align


            recto page only. like that if i enter x&y for verso. i want to align recto page only.

            • 3. Re: import pdf into indesign
              [Jongware] Most Valuable Participant

              Hi Ovyia... (Me not a "John", by the way, me "Theun".)


              Isn't that based on the original PlaceMultiPDF from Adobe? If I understand you correctly, there are only a few minor changes required.


              1. The Place command always places a new image on the (0,0) origin of the current ruler settings. You could move the image after placing, but this script does it another way: it moves the origin instead while placing. Change the lines at the top to



              -- the array OriginPoint gets used in the Place command.


              2. The script uses the variable "pg" twice -- first time, to select a page in the PDF (PDFpg=pg;), second time to point to the actual page the image is placed on (myPDFPage=app.activeDocument.pages[pg].place). So these are synchronized to work together -- PDF page #1 goes to page 1, PDF page #2 to page 2, and so on. You need to break this :-)


              Change the 'place' line to



              This now should place PDF page #1 (which gets counted as '0') on page 2*0 = 0 -- the first recto --, PDF page #1 onto page 2*1 = page 2 -- the next recto.

              If you need to start placing pages somewhere later, not on the first page, just add that offset:




              (this will start at page number 17, since the pages array starts counting at 0).

              • 4. Re: import pdf into indesign
                Oviya... Level 1

                Hi friend,


                i changed like your code. but still it's not working. i don't know wht to do?

                • 5. Re: import pdf into indesign
                  [Jongware] Most Valuable Participant

                  Sorry, "it is not working" is way too general. (Imagine sending your car into a garage for repairs, and tellign the mechanic "it does not work".)

                  1 person found this helpful
                  • 6. Re: import pdf into indesign
                    Oviya... Level 1

                    Thanks friend