Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

Override Master Items Displaces items on page (Javascript)

$
0
0

Hi,

 

I am trying to override all items in master pages using the follownig script:

 

function OverrideMasterItems() {
  var allItems = myDocument.pages[CurrentPage].appliedMaster.pageItems.everyItem().getElements();
  for(var i=0;i<allItems.length;i++){
    try{allItems[i].override(myDocument.pages[CurrentPage])}
    catch(e){}
  }
}

 

 

 

(thanks to Harbs fro providing this in another thread)

 

The problem I have is that once the script has run, all items move on the page. For example a text bos that in the master has coordinates of 0 and 1p6 ends up at 26p3 and 19p6

 

I'm probably over looking some really obvious settign somewhere but I just can't figure out what.

 

Working with CS6 and Javascript on a Mac

 

Thanks for any suggestions


Viewing all articles
Browse latest Browse all 15932

Trending Articles



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