5 Replies Latest reply on Feb 26, 2012 9:30 AM by Muppet Mark

    need help with javascript.. export interactive pdf (single pages)

    Evilia_77 Level 1

      I want to make an interactive pdf. Indesign only wants to export the interactive pdf to spreads.

      After some googling I found a javascript that makes it possible to make interactive pdf's of single pages.


      this is the javascript:


      aDoc = app.activeDocument;

      for (i=0;i<aDoc.pages.length;i++){

                aSide = aDoc.pages[i].side;

                aSide = aSide + "";



      aDoc.documentPreferences.allowPageShuffle = true;

      aDoc.documentPreferences.facingPages = false;

      aDoc.documentPreferences.allowPageShuffle = false;

      aDoc.documentPreferences.facingPages = true;

      for (i=0;i<aDoc.pages.length;i++){

                myPage = aDoc.pages[i];

                mySide = myPage.extractLabel("direction");

                if (mySide == "1818653800"){







      This script works really good. The problem I have is that the content on the right page moves 5 mm to te right.

      After some searching, I found that the problem is that my left and right margin isn't the same.

      I could change the margins with applescript and afterwards running this script. My interactive pdf is single paged and looks well


      Now I am wondering if someone can help me to get my original document back.