4 Replies Latest reply on Feb 11, 2009 8:11 AM by (James_Leyland)

    Export individual PDFs and save to a specified folder location?????

      Export individual PDFs and save to a specified folder location?????<br /><br />Hey guys, <br /><br />I was wondering if anyone knows of a way in which I can get Indesign CS3 to save to a specified location when exporting a PDF? <br /><br />I am currently using a data merge prior to running my java script to export a set number of pages to individual PDFs, but i am struggling to get it to save these PDFs to a specified folder location. <br /><br />The code I am using to export the PDFs looks like this: <br /><br />var SectionLength = 4; <br /><br />for (var p=0; p<app.activeDocument.pages.length; p += SectionLength) <br /><br />{ <br />     var currentpage = app.activeDocument.pages[p];<br />     var textframe = currentpage.textFrames.item("Company Name");<br />     var companyname = textframe.contents;<br />     var textframe2 = currentpage.textFrames.item("PDF Description");<br />     var pdfdescription = textframe2.contents;<br />     //alert(textframe.contents);<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(companyname+" - "+pdfdescription+".pdf"); <br /><br />          app.activeDocument.exportFile (ExportFormat.pdfType, theFile, false); <br /><br />     } <br /><br />}<br /><br />Any help would be great as I'm new to this scripting stuff and can't quite get it too work. <br /><br />Thanks very much for your help! <br />James