/ Id-Extras Forum / Loop through pages, loop through files / Reply To: Loop through pages, loop through files

#6441
Wonderboy

i figured it out

Code:
var sourceFolder = Folder(PathToPDF);

var files = sourceFolder.getFiles();

for (var i = 0; i < docLength; i++) { // alert(myPages[i].name); var parPage = myPages[i]; for (var j = 0; j < files.length; j++) { var rects = parPage.rectangles.everyItem().getElements(); rects[0].place(files[i]); break; } }