1 Reply Latest reply on Jan 13, 2015 10:53 AM by shadymilkman01

    InDesign CC Server 2014 app.open() File does not exist.

    shadymilkman01 Level 1

      I've set up InDesign CC Server 2014 trial on a Windows Server 2008 R2 and trying to run a simple script that converts a idml to PDF.

      Here's the code

      document = app.open(File("C:\inetpub\wwwroot\presentation\Documents\Resumes.idml"));
      document.exportFile(ExportFormat.PDF_TYPE, File ("C:\inetpub\wwwroot\presentation\Documents\file.pdf"));
      document.close();
      

       

      I'm running the script in ExtendScript Toolkit CC and it gets hung up every time on the first line, open() method.

      I've verified the path and permissions are fine as other scripts work that write output, such as this one.

       

      //HelloWorld.jsx
      //Create a new document.
      var myDocument = app.documents.add();
      //Get a reference to the first page.
      var myPage = myDocument.pages.item(0);
      //Create a text frame.
      var myTextFrame = myPage.textFrames.add();
      //Specify the size and shape of the text frame.
      myTextFrame.geometricBounds = ["6p0", "6p0", "18p0", "18p0"];
      //Enter text in the text frame.
      myTextFrame.contents = "Hello World!";
      //Save the document (fill in a valid file path).
      myDocument.save(new File("/c/HelloWorld.indd"));
      //Close the document.
      app.documents.item(0).close();
      

       

      No problems at all with that script.

      Please help!