Defining page range for PDF export
Hello,
I am trying to automate a PDF export process, where a single indesign file has to be exported as multiple PDFs into a specifically named folder structure. I have placed the information that the script needs on a non-printing layer on the first page of each PDF (The filename for the PDF and the foldername to put it in). My script successfully stores this information, along with the page number on which it was found.
The problem is that the indesign documents are divided into several sections and alternate layouts; when my script loops through the pages to harvest the information it stores the pages by their position in a zero-based array, not by their actual page numbers. It seems that it is the actual page numbers that are needed to define the page range for export. As the page numbers are repeated across the alternate layouts, I'm guessing would need to specify I section and a page number.
I can get the number of the page with pages.name, but how do I get the section number and put these two together in my page range definition?
BTW, all the PDFs are continuous page ranges, although sometimes they bridge section breaks.
Many thanks for any help.
