Validate and fix a Book's total page count via script
I am working on a process to automate the production of a multiple directories. As part of that process I have built a script that assembles my books and exports them to PDF. However, I need to make sure that the total page count of each book is a multiple of four(4) for printing purposes.
I know how to get the page count of an individual document, but I have not found a good way to get the total page count of a book. All of the documentation on Preflight scripting appears to be specific to a single document.
Ideally, if the page count is not a multiple of 4, the script would add extra pages to the last document in the book as well..
Any suggestions?
