Quantcast
Channel: Adobe Community : Popular Discussions - Creative Suite Extension Builder
Viewing all articles
Browse latest Browse all 41490

Unable to Place Image in InDesign MAC using Extension Builder

$
0
0

Hello,

 

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.a dd();

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

                    try{

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

                     }catch(e:Error)

                    {

                        trace(e);

                    }

}

 

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

 

Thanks...


Viewing all articles
Browse latest Browse all 41490

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>