My application generates a customizable 8"x5" label which is attached to large tanks. Sometimes users want smaller versions of the label, 8-up on 8.5"x11" stock. Our graphics department has an InDesign document that works perfectly. The document uses the Place command to place my label PDFs eight times in exact locations. InDesign automatically crops to the visible boundary, so all I have to do is replace my PDF with a new one.
I saved the graphic department's document as .idml which I edited to make the PDF paths relative rather than absolute. InDesign automatically regenerates the page when it opens the document.
Now I want to use InDesign to automate this task. The server version would be serious overkill; all I need is a script that will run when the document opens on startup. The script has to export the document as PDF (for print) to a fixed filename, then close InDesign.
An alternative would be to leave InDesign open, but I'd have to figure out how to send it an instruction to open the document, export it as PDF, then close the document.
I think the first technique can be done with just a couple of lines of JS. Any sample code showing how to do it would be greatly appreciated.
Here's a list of the actions the simplest script would have to implement:
The more complicated version would leave InDesign running between documents, using these actions:
Thanks again for any guidance,