Copy link to clipboard
Copied
OK here is an easy one to answer I cant figure out how to get a page count, Ive looked on the web and I cant find anything (that works)?
Im just starting a script to put items on specific pages. This what I thought should work, but dosent?
var myDocument = app.activeDocument;
var Count = myDocument.numPages;
alert('This document has ' + Count + ' pages.', 2, 0);
*also tried
var Count = myDocument.pages.numPages;
what am I not seeing/understanding to make this work?
Copy link to clipboard
Copied
Hi,
look up DOM documentation. E.g. Jongware's:
Pages have a length property.
If you want to change the number of pages in a document you can use method add() of object Pages.
Or you can change that directly at document level with the document preferences:
Adobe InDesign CS6 (8.0) Object Model JS: DocumentPreference
See into pagesPerDocument and startPageNumber .
Regards,
Uwe
Find more inspiration, events, and resources on the new Adobe Community
Explore Now