5 Replies Latest reply on Jun 27, 2013 3:34 AM by Wander5

    PDF export to selective Path


      Hi Everybody,


      I tried this below code to export my PDF, in a specific location defined in script.


      But, I could only receive the error"cant find the folder location"~C:\\Documents and Settings\Wande\Desktop\Wander_2.pdf".


      when i tried using the same script in MAC, it works, but in Windows, it is not.


      myFolder = "~C:\\Documents and Settings\Wande\Desktop\Wander_2\";

        var myDoc = app.activeDocument;


      //var myPath = myDoc.filePath;

      // I want to save the PDF in my specific location (myFolder) and not inside the document path (myDoc.filePath).


      var myDocname = myDoc.name.split(".indd");

      app.activeDocument.exportFile(ExportFormat.PDF_TYPE, File(new File(myFolder+"\\" + myDocname.join(".pdf"))));


      Please help on this forum.