Uwe, I'm not familiar with Scott Zanellis' script, but I do know all the issues I've encountered in my own scripts when trying to determine the page count of a pdf file (after a lot of frustration, i've given up and used the same method as the sample script - import pdf pages until they repeat). That is because the PDF standard is fairly lax and with a lot of fallbacks, and different vendors implement different ways of representing the structure of the document (Corel being the worst example I encountered, followed by MS Office's pdf export engine). In this particular case, however: 1. we know that the source pdfs come from InDesign, so they are quite close to the standard. 2. The definition of the Page object and the Page Boxes objects is one of the few things in the standard that leaves little room for "creative interpretation".
... View more