Copy link to clipboard
Copied
In my document have multiple section.
I need to change the page number of first page. But its throwing error
Error: Must set continue numbering as false before changing page number start.
Also i need to change the existing page number of another section
Its throwing Another section already exists on this page.
How to change this please advice.
Hi there,
Try this below code. This might help you!
var c = 0;
while(c < app.activeDocument.pages.length){
try{
var sec = app.activeDocument.sections.add(app.activeDocument.pages
); sec.continueNumbering = false;
sec.pageNumberStart = 1;
}
catch(e){
var sec = app.activeDocument.sections[0];
sec.continueNumbering = false;
sec.pageNumberStart = 1;
}
c++;
}
Copy link to clipboard
Copied
Hi there,
Try this below code. This might help you!
var c = 0;
while(c < app.activeDocument.pages.length){
try{
var sec = app.activeDocument.sections.add(app.activeDocument.pages
); sec.continueNumbering = false;
sec.pageNumberStart = 1;
}
catch(e){
var sec = app.activeDocument.sections[0];
sec.continueNumbering = false;
sec.pageNumberStart = 1;
}
c++;
}