Copy link to clipboard
Copied
so..
some of the documents i work with use a wierder page numbering system (for example a document might contain pages 1-10, followed by 10a, 10b, 10c, 10d, 11-22, then 22 a to 22 r. that is because after the documents are printed - and the are in the 4000-5000 pages range each, additional content can be added where is neded, without reprinting the entire "book").
the problem is that i also have to add in the footer of the document the absolute page number in the document (for example: "Page: 10b - (12 of 148)")
I have made a script that does static numbering, then the document is ready to be printed i run the script and it adds/replaces the page number in the designated frame, but it would be a great help for me it the numbering would be dynamical. Maby like a custom variable or something?
Any ideeas on how i can do something like that?
Copy link to clipboard
Copied
Uee the below code:
var myDoc = app.activeDocument;
var PageLengh = myDoc.pages.length
for(var i=0; i<PageLengh; i++)
{
var PageName = myDoc.pages.name;
var PageNum = i+1;
var myFooter = "Page: " + PageName + " - (" + PageNum + " of " + PageLengh +")";
alert(myFooter); //INSERT YOUR FOOTER CREATION FUNCTION HERE
}
Include section prefix option while creating new section.
Ram
Copy link to clipboard
Copied
thanks. that's mostly how i did it. i was looking for a more advancd solution, so the footer will update whenever i add/remove/move etc a page.