1 Reply Latest reply on Jul 15, 2008 5:18 AM by Bernd Alheit

    js, fine in v5, fails in v8

      The following script runs in v5, but in v8 gives me an "An internal error occurred" message. What is different?

      // This routine adds a blank page after the page in the document pane.
      function insertblankpage(){
      var blankPage = app.newDoc(); //make a blank file
      blankPage.saveAs("tmp pdf file - delete.pdf"); //save blank page file
      this.insertPages(this.pageNum,"tmp pdf file - delete.pdf") ;//insert page
      blankPage.closeDoc (true); } //close the blank page file

      // Add menu items

      app.addSubMenu({ cName: "Test", cParent: "View", nPos: 0});

      app.addMenuItem({ cName: "Insert test", cParent: "Test",
      cExec: "insertblankpage();"});

      Thanks, for any help.