0 Replies Latest reply on May 8, 2012 5:58 AM by nilamk

    Unable to Place Image in InDesign MAC using Extension Builder




      I am using Extension builder along with InDesign CS5.5.

      I need to place a file in InDesign rectangle box.


      Following is the function:

      public function placeImages(getFileObj:File):void{

                      var parentDir:File =  getFileObj.parent;

                      var FileToPlace:File = getFileObj.resolvePath(getFileObj.name);

                      if(mx.core.Application.application.hostName == "com.adobe.indesign"){               

                          app.activeDocument.frameFittingOptions.autoFit = false;

                          app.activeDocument.frameFittingOptions.fittingOnEmptyFrame = EmptyFrameFittingOptions.FILL_PROPORTIONALLY;

                          app.activeDocument.frameFittingOptions.fittingAlignment = AnchorPoint.CENTER_ANCHOR;

                          var Indesignbox:com.adobe.indesign.Rectangle= app.activeDocument.spreads.firstItem().pages.firstItem().rectangles.add();

                          Indesignbox.geometricBounds = app.activeDocument.spreads.firstItem().pages.firstItem().bounds;


                                  Indesignbox.place(FileToPlace); // Auto scales…







      This works perfectly on Windows. But I run the extension on MAC, somehow "/Volumes" is getting appended to the File object. File object in this case is "FileToPlace". Nornally a path would look like this:

      “/Users/mini3/Documents/flower”. (This is just an example)

      But, if I see in the trace, I get the following error:

      Cannot find the folder “/Volumes/Users/mini3/Documents/flower”


      As "/Volumes" is getting appended, InDesign is unable to find the path. Where from this is getting appended?


      Has anyone used image place functionality on Mac in InDesign using Extension Builder.

      Any help is appreciated, as I am really running short of time