Export all open docs as PDF
I am working on a script which should export all the open docs as PDF.
I use the following script to export. but InDesign does not export all the PDF. Assume, I have opened seven docs and the script exports only 4 docs and again come back to the first exported doc. can any one help how to resolve the issue.
var myTotalDocs = (app.documents.length);
for(var i = 0; i < myTotalDocs; i++)
{
myDocument = app.documents;
app.activeDocument = myDocument;
var myFilePath = app.activeDocument.filePath;
app.activeDocument.exportFile(ExportFormat.pdfType, File(myFilePath+"/"+".pdf"),false);
}
Thanks