Thanx Bob, thankx Brian. My problem was the absolute Position on both sides of a double sided document. But I found the solution, it's the red line: var myDoc = app.activeDocument; var theSelection = myDoc.selection; var numSelection = theSelection.length; app.doScript(auswahlCheck, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Process Table"); function auswahlCheck(){ objArray = []; for (i=0; i<numSelection; i++){objArray.push(theSelection[i]);} objArray.sort(function (a, b) {return Number(a.geometricBounds[0]) - Number(b.geometricBounds[0]);}); for (i=0; i<numSelection; i++) { var myObj = objArray[i]; var myPage = theSelection[i].parentPage; var hoehe = myObj.geometricBounds[2]-myObj.geometricBounds[0]; var breite = myObj.geometricBounds[3]-myObj.geometricBounds[1]; if (i==0) {var y1 = myPage.bounds[0]+myPage.marginPreferences.top;} else if (i>0) { var vorherigesObj = objArray[i-1]; var y1 = vorherigesObj.geometricBounds[2]+1.764 ; } var x1 = myPage.bounds[1]+myPage.marginPreferences.left; var y2 = y1+ hoehe; if (i==2) {var y2 = myPage.bounds[2]-myPage.marginPreferences.bottom} var x2 = myPage.bounds[3]-myPage.marginPreferences.right; myObj.geometricBounds= [y1,x1,y2,x2]; } }
... Afficher plus