Copy link to clipboard
Copied
Hi @BarlaeDC,
We could delete the pages of A-Master, I posted my comment on the other duplicate thread.
-Manan
Copy link to clipboard
Copied
Hi,
I am not sure I understand what you are trying to achieve.
Are you trying to change the number of page in the one (or more) Masters when you start a file?
Copy link to clipboard
Copied
I'm trying to script changing the number of pages in the Masters, from two down to one in my specific case. I get a number of files with the master spread pages number set to the wrong count and I'd like to automate setting them to the right count (as needed).
Copy link to clipboard
Copied
If the solution mentioned in the other thread works then we can extend it to make all the masterspreads in the document to have a single page by something like the following
for(var i = 0; i < app.documents[0].masterSpreads.length; i++)
{
for(var j = 1; j < app.documents[0].masterSpreads[i].pages.length; )
app.documents[0].masterSpreads[i].pages[-1].remove()
}
-Manan
Copy link to clipboard
Copied
I am still not sure why scripting it if chaging the settings to single page will achieve it with 1 click. I must be missing something here.
Copy link to clipboard
Copied
Hi,
Do you mean that you want to change A-Master to only have 1 page, rather than 2. I don't think that is doable, although you could script the creation of a new MasterSpread that only has 1 page which is just
app.activeDocument.masterSpreads.add(1);
Then just use that master, you could probably script it to update all the pages to use the new master but I haven't investigated that.
Copy link to clipboard
Copied
Hi @BarlaeDC,
We could delete the pages of A-Master, I posted my comment on the other duplicate thread.
-Manan