Create one report from multiple pdf files
I have an action script to create a report listing the document file names from multiple pdf files.
The script is creating multiple reports for each pdf file, instead of appending each document file name in the single report.
If anyone can help to amend the script so that a single report is created will be most appreciated
// Begin job
var docfile = this.documentFileName;
if ( typeof global.counter == "undefined" )
{
global.counter = 0;
}
// Main code to process each of the selected files
try {
global.counter++
global.report = new Report()
global.report.writeText("Report on File \#"+global.counter + docfile + "\r\n");
global.report.open("job report")
} catch(e) {
console.println("Batch aborted on run #" + global.counter);
delete global.counter; // Try again, and avoid End Job code
event.rc = false; // Abort batch
}
// End job
if ( global.counter == global.FileCnt ) {
console.println("End Job Code"); /
/ Insert endJob code here
// Remove any global variables used in case user wants to run
// another batch sequence using the same variables
delete global.counter;
}
