This content has been marked as final. Show 4 replies
Maybe what is a problem is the way you manage your package creation and closing the document.
As you close the doc while incrementing from 0, the index of the next doc is always changing and the last index is not present anymore. So when the script try to reach this one it will fail.
In this kind of cases, it's good to decrease from max to zero
so you should have :
for (i = bb.length-1; i >= 0; i--)
so when you close for example bb, bb is still accessible.
Hope it helps.
It works, but when I am collecting output files I want to create seprate folder for each chapters. Finallay I the folder structure will be like this
ch01 package files
ch02 package files
a r u l
I couldn't test it here
var myFolder = Folder.selectDialog("Please select a folder");
for (i = bb.length-1; i >=0 ; i--)
var mychapterfolder = new Folder(myFolder.fullName + "/"+bb[i].name)
app.activeDocument.packageForPrint (mychapterfolder, true, true, true, true, true, true,true);
Did you get something ?