My company runs reports providing monthly performance analyses. These reports are quite lengthy (range from 200 to 400 pages or thereabout). There are specific tables in the reports with unique headings that I would like to extract and compile in Excel. Acrobat X does a beautiful job with converting these pages into a very usable Excel format.
I would like a batch process that would browse through these reports (about 60 per month), extract the specific-text-containing pages and save them in a separate folder as Excel files.
I was able to do this process easily in batch for reports that had the pages I wanted located in a specific page number for all reports using the script below after pointing to the folder in "Start With" and after running the script, asking that the file be saved in an Excel format:
/*This line deletes from FIRST PAGE to numbered +1 page*/
this.deletePages({nEnd:1});
/*This line deletes from SECOND PAGE (of the remaining after the above script) to the last page*/
this.deletePages(1, this.numPages-1 );
So, my question is, instead of this script, is there a script that I can use to extract a page that contains specific text or alternatively, delete all pages of the document except for the page that contains specific text?
Your articles have been very insightful and are greatly appreciated.
Looking forward to hearing from you.
With thanks,
Charles.
The Annotation object has a 'page' property for an annotation, you can create an array with an element for each page and the contents of each element would be Werther a page has a comment annotation or not. From there you can get a list of all pages without annotations and delete them.
George Kaiser