Skip to main content
Participant
December 16, 2022
Answered

add 4 pages

  • December 16, 2022
  • 2 replies
  • 475 views

add 4 pages before the current document

apply master pages for added pages and page number option as lower roman

 

This topic has been closed for replies.
Correct answer brian_p_dts

Give this a shot. Change "A-Parent" to whatever the name of the parent you want to apply is. Of course, all the documents you have open need to have that named parent spread. 

var docs = app.documents;
var n = docs.length;
var doc, i, master;
while(n--) {
    doc = docs[n];
    i = 4;
    master = doc.masterSpreads.itemByName("A-Parent");
    while(i--) {
        doc.pages.add(LocationOptions.BEFORE, doc.pages[0], {appliedMaster: master});
    }
    doc.sections.add(doc.pages[0], {pageNumberStyle: PageNumberStyle.LOWER_ROMAN});
}

 

2 replies

Mike Witherell
Community Expert
Community Expert
December 17, 2022

Layout > Pages > Insert Pages

Select the first of these inserted pages, and then click the Pages panel menu button > Numbering and Section Options ... where you can choose lower case roman numerals.

Mike Witherell
bala5FF4Author
Participant
December 17, 2022

can have a script for the above request, need to change more than 100 documents.

brian_p_dts
Community Expert
brian_p_dtsCommunity ExpertCorrect answer
Community Expert
December 17, 2022

Give this a shot. Change "A-Parent" to whatever the name of the parent you want to apply is. Of course, all the documents you have open need to have that named parent spread. 

var docs = app.documents;
var n = docs.length;
var doc, i, master;
while(n--) {
    doc = docs[n];
    i = 4;
    master = doc.masterSpreads.itemByName("A-Parent");
    while(i--) {
        doc.pages.add(LocationOptions.BEFORE, doc.pages[0], {appliedMaster: master});
    }
    doc.sections.add(doc.pages[0], {pageNumberStyle: PageNumberStyle.LOWER_ROMAN});
}

 

Robert at ID-Tasker
Legend
December 17, 2022

You can apply different MasterSpread to the newly added pages - simply by Drag&Drop. 

 

https://helpx.adobe.com/uk/indesign/using/master-pages.html