2 Replies Latest reply on Oct 5, 2011 7:09 PM by nis2008

    HELP - Adobe Professional 8 - Javascript Coding to Insert Pages

    nis2008 Level 1

      Hello,

       

      I have to merge two pdf documents together. I am using Adobe Acrobat Professional 8. So in Doc # 1, I have 10 pages and in Doc # 2, I have 20 pages. I have to add the 20 pages from doc # 2 after each SECOND page in doc # 1, so the total pages in the end will be 110 pages in the final merged pdf. I can do this manually by inserting the document after each page but it's a pain when I have to do for 200 pages. I have found a JavaScript code, searching online, which allows me to automatically input the pages. However, this JavaScript is meant to add an even page for each odd page, which doesn't work for me. I played around with the coding but with no success since I don't have any javascript coding experience. Can you please help me solve this issue?

       

      This is what I want to do:

       

      [page1][page2][*][page3][page4][*][page5][page6][*][page7][page8][*][page9][page10][*]

                -->Insertion happens at the [*].

       

      With some help, I got this code:

       

        for (i=1; i<numPages; i+2) {  this.insertPages(i,"Even.pdf")  }

      However, there is an issue with this code, the attachment pdf inserts all 20 pages after 2 pages of the Test File, but then continues to repeat and insert the 20 pages again, insert 20 pages again ... until I manually stop it by hitting Esc.

       

      So it looks like this:

      Pg.1, Pg2. * * * * * * * * * Pg.3, Pg.4, Pg.5, Pg. 6

       

      Inserting point at *

       

      Please help me with this.

       

      Thank you,