Set pdf page number to Indesign page number
I'm looking for an elegant way, in javascript, to loop through a document and set all placed PDF's page numbers (place PDF Option) to match the Indesign page number that they are placed on. In otherwords, a 20 page pdf placed in a 20 page Indesign document where page 1 of the PDF on page 1 of the Indesign doc, page 2 of the PDF is on page 2 of the Indesign doc, etc.
I presently use a PDF Multipage Import script, which works great but I'd like be able to achieve multiple impositions, on a single page, without having to keep rerunning the script and calculating the position offset. The idea being that a single layout, say business cards, is layed out 8up on a master page (page one of the PDF, one name per page)> the number of pages in the Indesign doc is set to = the number of pages in the pdf >all pages are selected and the master page items released (resulting in page 1 of the pdf being 8up on every page of the Indesign doc)>the script is run and the pdfs change their page numbers to match the page they are on.
It seems like a walking through an array is the ticket, but I'm a noob and don't understand how to address the pdfs.
Any help would be appreciated.
