Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello @dsomrz,
Can you try using the following script to see if it helps with your workflow:
// Create a new master spread
var myDocument = app.activeDocument;
var myMasterSpread = myDocument.masterSpreads.add();
var myMasterPage = myMasterSpread.pages.item(0);
// Loop through the pages and apply the master spread to every other page
for (var i = 1; i < myDocument.pages.length; i += 2) {
myDocument.pages.item(i).appliedMaster = myMasterSpread;
}
Looking forward to hearing from you.
Anubhav
Copy link to clipboard
Copied
would i copy and paste into script editor or text edit.
Copy link to clipboard
Copied
Use a plain text editor (not RTF), save as .jsx file then save jsx to script folder in panel.
Copy link to clipboard
Copied
I don't think this will work since it's not injecting new pages. Try this instead:
var d = app.activeDocument;
var ps = d.pages;
var i = ps.length:
while(i--) {
var p = d.pages.add(LocationOptions.AFTER, ps[i];
p.appliedMaster = null;
}
Copy link to clipboard
Copied
I used the text editor for mac but it doesn't work, changed the extension to .jsx or do i have to use another plain text editor
Copy link to clipboard
Copied
I used the text editor for mac but it doesn't work, changed the extension to .jsx or do i have to use another plain text editor
By @dsomrz
If you're using TextEdit, then make sure to use the plain text mode. Cmd-Shift-T toggles between plain text and RTF, you'll see right away which mode you're in.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Sorry the colon after ps.length should be a semicolon. Coding on phones is hard.
Copy link to clipboard
Copied
Found a script here that seems to do it
Might be what's here already , haven't checked.
Copy link to clipboard
Copied
thanks. I saw that but when I click on the link it says safari can not open the page. I tried in Chrome and same thing.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ack, a missing paren too. More coffee before posting and not on mobile : ). This should do it.
var d = app.activeDocument;
var ps = d.pages;
var i = ps.length;
while(i--) {
var p = d.pages.add(LocationOptions.AFTER, ps[i]);
p.appliedMaster = null;
}
Copy link to clipboard
Copied
AWESOME!. Thanks that work, really appreciate it. Have a good day
Copy link to clipboard
Copied
Why do you want to do that? If you want to print left and right, why do you not set up the document with facing pages? This would be the correct way.
Copy link to clipboard
Copied
it was a supplied Indesign document from a customer. I didn't set it up originally.
Copy link to clipboard
Copied
What hinders you to change the setup to facing pages?
Copy link to clipboard
Copied
Because they need the facing page to be blank?
Copy link to clipboard
Copied
nothing hinders me from changing it to facing pages. I just want to be able to add a blank page after each page without having to change their file. I can do this in Acrobat, but wanted to know if there was a way to do it in Indesign
Copy link to clipboard
Copied
THe correct way is to set up as facing pages. Inserting pages will also change the document. Set up the facing master, one side empty, the other with text frame and let the text run in.
Copy link to clipboard
Copied
ok, it is a customer supplied indesign file.