Posted by: lepton_82
javascript to count no of pages - 11/30/10 10:29 AM
I am using the below javascript to count the no of pages in a PDF document/documents in a particular location(folder). I get the output in the console window but i would like to get the output in an excel sheet. Since I handle many number of PDF files, i would like to get the o/p in an excel sheet so that i can use it for reports.
if ( typeof global.PageCnt == "undefined")
{
console.show();
console.clear();
global.PageCnt = 0;
}
global.PageCnt += this.numPages;
console.println("The file " + this.path + " has "
+ this.numPages);
console.println("Total so far = " + global.PageCnt);