0 Replies Latest reply on Oct 26, 2010 2:52 PM by Kamrun.

    CS5:facingpages and Tagging element


      Hi all,


      I'm kinda novice in java scripting, I inherited some script that does tagging an xml element in doc, it works fine for single pages docs,but for the cases that element located in facing pages AND in the right page, the new element moves to the right exactly as much as the size of a page. It's kinda complex situation but when I tag the element I get the old element position, create new element with old X,Y position:




      //'elem' - the XMLElement referencing the page item to be replaced

      var myObj = elem.xmlContent;

      var bounds = myObj.geometricBounds;

      var insertAt = Array( bounds[1], bounds[0]);



      var newobjs = thepage.place( snpt,insertAt,thelayer,false,false ); // the element appears in right side of second page in facing page


      myObj.remove(); //clean up old object


      Not sure how to calculate the X position of new element (newobjs ) with having the old X offset (bounds[1]) of original element for facing pages situation


      Any help greatly appreciated,