Hi guys,
I have a very basic scripting need. What I need is for a script to retrieve the number of the first page in a document and then renumber that same starting page by adding 2 to it. Thanks.
Do you have to do this repeatedly? It seems easier to just do it by hand?
Also, do you want the second page of the document to stay where it was? Such that the third page is numbered the same as the new number of the first page? If so, you'll need to create a new section starting on the 2nd page. Unless you have already done so?
I'm having trouble imagining why you would want to do this...
Yes, I have to do it on 250+ documents. I'm going to use a script runner to automate the process once I have a working script. No, I do not want the third page to stay where it was. Each of the documents only has one section, and I want the page numbers to be bumped up by two across the board.
@CambLSAT – if you are on InDesign CS5 or CS5.5 you could do that by the "startPageNumber" property of the DocumentPreferences like that:
myDocument.documentPreferences.startPageNumber = myDocument.documentPreferences.startPageNumber + 2;
To apply it to your 250+ documents you have to open all the documents, apply the new number, save and close the document.
You could do that in a loop.
Or you could stick all your documents into a InDesign book file and adress all docs in that book running a loop through all docs in that book.
Uwe
… because an InDesign book can contain only 130 documents.
Ouch! Never realised that. Peter, thank you for pointing this out.
Does this number differ per InDesign version?
After testing with InDesign CS5.5: I could not verify that number.
See screenshot (150 InDesign files in one book):
(Maybe other circumstances will be a limit: overall file size, memory restrictions?)
Uwe
Thanks for your help Peter. I'm actually using your batch script (http://www.kahrel.plus.com/indesign/batch_convert_cs3.html) to run this and other small scripts on tons of documents.
North America
Europe, Middle East and Africa
Asia Pacific