1 Reply Latest reply on Nov 3, 2008 1:19 PM by [Jongware]

    Existing script to export PDFs and Package INDDs in 32-page increments?

      I have a client who is otherwise wonderful who DEMANDS that I give her 32-page PDFs and raw INDD files of the 300-page magazine I'm designing. I can't actually create the document that way, because we move pages and stories around too much.

      I do a lot of exports of the whole book as PDFs and at least two packages of the whole book. It is incredibly time-consuming to export as PDF, pp 1-32, then export as pdf, page 33-64, etc., and too easy for mistakes to creep in. Now I export the whole thing and just delete pages in Acrobat, but that's still a stupid waste of time. And it's far worse with packaging the INDD files w/links - I have to delete all the non-necessary pages, and since you can't undo large page deletions I have to re-open the file and start over.

      Please someone tell me they know of a script to automate this. I'm going crazy here. It would take me days to try and write an applescript for this and while there may be one out there, I can't find it because the search terms are too common for Google to narrow it down.
        • 1. Re: Existing script to export PDFs and Package INDDs in 32-page increments?
          [Jongware] Most Valuable Participant
          <pre>// Output PDF pages, stupidly per 32 pages.<br /><br />// Whatever!<br /><br />var SectionLength = 32;<br /><br />for (var p=0; p<app.activeDocument.pages.length; p += SectionLength)<br /><br />{<br /><br />     with(app.pdfExportPreferences)<br /><br />     {<br /><br />          if (p+SectionLength-1 > app.activeDocument.pages.length)<br /><br />               pageRange = app.activeDocument.pages[p].name+"-"+app.activeDocument.pages[app.activeDocument.pages.le ngth-1].name;<br /><br />          else<br /><br />               pageRange = app.activeDocument.pages[p].name+"-"+app.activeDocument.pages[p+SectionLength-1].name;<br /><br />          theFile = new File(pageRange+".pdf");<br /><br />          app.activeDocument.exportFile (ExportFormat.pdfType, theFile, false);<br /><br />     }<br /><br />}</pre>A javascript. Copy, correct line endings and less-than's (as these are likely to be mangled by the forum), and save as "export32.js" in your script folder.<br /><br />Does nothing with your 32-page INDD document request.