// Acrobat JavaScript Code - www.evermap.com // DELETE PDF PAGES WITHOUT TEXT // IMPORTANT: This script assumes that page is blank if it does not contain any "pdf words" // OUTPUT: An output PDF file is created by appending _Original.pdf to the filename try { var newName = this.path; var filename = newName.replace(".pdf","_Original.pdf"); this.saveAs(filename); for (var i = 0; i < this.numPages; i++) { numWords = this.getPageNumWords(i); if (numWords == 0) { // this page has no text, delete it this.deletePages(i,i); } } } catch(e) { app.alert(e); }