4 Replies Latest reply on Nov 5, 2012 5:50 AM by Paul Hough

    Newbie in need of help CENTER_CONTENT

    Paul Hough

      I am working in Enfocus Switch and have a simple command that I need to execute in indesign (java in CS 5.5) I need to center all object inside their rectangle frame. But I dont know how to select an object in indesign and center the content (using Java). here is my best guess;

       

      >>>   app.activeDocument.activeSpread.fit(FitOptions.CENTER_CONTENT(ALL));   <<<<<<

       

      I understand I am probably way off, any help at all would be greatly appreciated!!!!

       

      Thanks,

      Paul Hough

       

      Edit: I have figured out how to center the content inside of rectangles:

       

      app.activeDocument.pages[0].rectangles[0].images[0].fit(FitOptions.CENTER_CONTENT);

       

      But, I still dont know how to get a variable with the number of rectangles on a page/doc so I can create a loop.

      Any tips or pointer are appreciated